mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-25 21:59:19 +00:00
Test large immutable upload and download.
This commit is contained in:
parent
450eed7868
commit
5dc108dfe8
@ -53,17 +53,20 @@ def test_put_from_stdin(alice, get_put_alias, tmpdir):
|
|||||||
def test_get_to_stdout(alice, get_put_alias, tmpdir):
|
def test_get_to_stdout(alice, get_put_alias, tmpdir):
|
||||||
"""
|
"""
|
||||||
It's possible to upload a file, and then download it to stdout.
|
It's possible to upload a file, and then download it to stdout.
|
||||||
|
|
||||||
|
We test with large file, this time.
|
||||||
"""
|
"""
|
||||||
tempfile = tmpdir.join("file")
|
tempfile = tmpdir.join("file")
|
||||||
|
large_data = DATA * 1_000_000
|
||||||
with tempfile.open("wb") as f:
|
with tempfile.open("wb") as f:
|
||||||
f.write(DATA)
|
f.write(large_data)
|
||||||
cli(alice, "put", str(tempfile), "getput:tostdout")
|
cli(alice, "put", str(tempfile), "getput:tostdout")
|
||||||
|
|
||||||
p = Popen(
|
p = Popen(
|
||||||
["tahoe", "--node-directory", alice.node_dir, "get", "getput:tostdout", "-"],
|
["tahoe", "--node-directory", alice.node_dir, "get", "getput:tostdout", "-"],
|
||||||
stdout=PIPE
|
stdout=PIPE
|
||||||
)
|
)
|
||||||
assert p.stdout.read() == DATA
|
assert p.stdout.read() == large_data
|
||||||
assert p.wait() == 0
|
assert p.wait() == 0
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user