Skip to content

Commit d293b50

Browse files
committed
Fix error message to be accurate with all cases + Fixed auto tests for last change.
1 parent 72fc976 commit d293b50

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

run-tests-minio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def test_curl_HEAD(label, src_file, **kwargs):
266266
cmd.append(src_file)
267267
return test(label, cmd, **kwargs)
268268

269-
bucket_prefix = u"%s-" % getpass.getuser()
269+
bucket_prefix = u"%s-" % getpass.getuser().lower()
270270

271271
argv = sys.argv[1:]
272272
while argv:
@@ -594,7 +594,7 @@ def pbucket(tail):
594594
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/xyz/etc2/logo.png'" % (pbucket(1), pbucket(3)) ])
595595

596596
## ====== Recursive copy
597-
test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % pbucket(1), '%s/copy' % pbucket(2), '--exclude', 'demo/dir?/*.txt', '--exclude', 'non-printables*'],
597+
test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % pbucket(1), '%s/copy/' % pbucket(2), '--exclude', 'demo/dir?/*.txt', '--exclude', 'non-printables*'],
598598
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/copy/etc2/Logo.PNG'" % (pbucket(1), pbucket(2)),
599599
"remote copy: '%s/xyz/blahBlah/Blah.txt' -> '%s/copy/blahBlah/Blah.txt'" % (pbucket(1), pbucket(2)),
600600
"remote copy: '%s/xyz/blahBlah/blah.txt' -> '%s/copy/blahBlah/blah.txt'" % (pbucket(1), pbucket(2)) ],

run-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def pbucket(tail):
582582
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/xyz/etc2/logo.png'" % (pbucket(1), pbucket(3)) ])
583583

584584
## ====== Recursive copy
585-
test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % pbucket(1), '%s/copy' % pbucket(2), '--exclude', 'demo/dir?/*.txt', '--exclude', 'non-printables*'],
585+
test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % pbucket(1), '%s/copy/' % pbucket(2), '--exclude', 'demo/dir?/*.txt', '--exclude', 'non-printables*'],
586586
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/copy/etc2/Logo.PNG'" % (pbucket(1), pbucket(2)),
587587
"remote copy: '%s/xyz/blahBlah/Blah.txt' -> '%s/copy/blahBlah/Blah.txt'" % (pbucket(1), pbucket(2)),
588588
"remote copy: '%s/xyz/blahBlah/blah.txt' -> '%s/copy/blahBlah/blah.txt'" % (pbucket(1), pbucket(2)) ],

s3cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def subcmd_cp_mv(args, process_fce, action_str, message):
817817
# Trying to mv dir1/ to dir2 will not pass a test in S3.FileLists,
818818
# so we don't need to test for it here.
819819
if len(remote_list) > 1 or cfg.recursive:
820-
raise ParameterError("Destination must be a directory and end with '/' when acting on multiple sources.")
820+
raise ParameterError("Destination must be a directory and end with '/' when acting on a folder content or on multiple sources.")
821821

822822
if cfg.recursive:
823823
for key in remote_list:

0 commit comments

Comments
 (0)