Permalink
Browse files

Fix error message to be accurate with all cases + Fixed auto tests fo…

…r last change.
  • Loading branch information...
1 parent 72fc976 commit d293b5079450cf1e8e12e328442c9d9ed3c20850 @fviard fviard committed Jun 11, 2017
Showing with 4 additions and 4 deletions.
  1. +2 −2 run-tests-minio.py
  2. +1 −1 run-tests.py
  3. +1 −1 s3cmd
View
@@ -266,7 +266,7 @@ def test_curl_HEAD(label, src_file, **kwargs):
cmd.append(src_file)
return test(label, cmd, **kwargs)
-bucket_prefix = u"%s-" % getpass.getuser()
+bucket_prefix = u"%s-" % getpass.getuser().lower()
argv = sys.argv[1:]
while argv:
@@ -594,7 +594,7 @@ def pbucket(tail):
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/xyz/etc2/logo.png'" % (pbucket(1), pbucket(3)) ])
## ====== Recursive copy
-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*'],
+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*'],
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/copy/etc2/Logo.PNG'" % (pbucket(1), pbucket(2)),
"remote copy: '%s/xyz/blahBlah/Blah.txt' -> '%s/copy/blahBlah/Blah.txt'" % (pbucket(1), pbucket(2)),
"remote copy: '%s/xyz/blahBlah/blah.txt' -> '%s/copy/blahBlah/blah.txt'" % (pbucket(1), pbucket(2)) ],
View
@@ -582,7 +582,7 @@ def pbucket(tail):
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/xyz/etc2/logo.png'" % (pbucket(1), pbucket(3)) ])
## ====== Recursive copy
-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*'],
+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*'],
must_find = [ "remote copy: '%s/xyz/etc2/Logo.PNG' -> '%s/copy/etc2/Logo.PNG'" % (pbucket(1), pbucket(2)),
"remote copy: '%s/xyz/blahBlah/Blah.txt' -> '%s/copy/blahBlah/Blah.txt'" % (pbucket(1), pbucket(2)),
"remote copy: '%s/xyz/blahBlah/blah.txt' -> '%s/copy/blahBlah/blah.txt'" % (pbucket(1), pbucket(2)) ],
View
2 s3cmd
@@ -817,7 +817,7 @@ def subcmd_cp_mv(args, process_fce, action_str, message):
# Trying to mv dir1/ to dir2 will not pass a test in S3.FileLists,
# so we don't need to test for it here.
if len(remote_list) > 1 or cfg.recursive:
- raise ParameterError("Destination must be a directory and end with '/' when acting on multiple sources.")
+ raise ParameterError("Destination must be a directory and end with '/' when acting on a folder content or on multiple sources.")
if cfg.recursive:
for key in remote_list:

0 comments on commit d293b50

Please sign in to comment.