This adds a test to put a large file (> multipart-chunk-size-mb) from
stdin.
... | ... |
@@ -353,6 +353,13 @@ os.system('dd if=/dev/urandom of=testsuite-out/urandom.bin bs=1M count=16') |
353 | 353 |
test_s3cmd("Put multipart", ['put', '--multipart-chunk-size-mb=5', 'testsuite-out/urandom.bin', '%s/urandom.bin' % pbucket(1)], |
354 | 354 |
must_not_find = 'abortmp') |
355 | 355 |
|
356 |
+## ====== Multipart put from stdin |
|
357 |
+cmd_args = ['cat', 'testsuite-out/urandom.bin', '|', 'python2', 's3cmd', 'put', '--multipart-chunk-size-mb=5', '-', '%s/urandom2.bin' % pbucket(1), '> /dev/null 2>&1'] |
|
358 |
+# hack - execute using os.system to match user's usage of s3cmd exactly |
|
359 |
+os.system(' '.join(cmd_args)) |
|
360 |
+test_s3cmd("Multipart large put from stdin", ['ls', '%s/urandom2.bin' % pbucket(1)], |
|
361 |
+ must_find = ['%s/urandom2.bin' % pbucket(1)]) |
|
362 |
+ |
|
356 | 363 |
## ====== Clean up local destination dir |
357 | 364 |
test_flushdir("Clean testsuite-out/", "testsuite-out") |
358 | 365 |
|