object urls can start with http:// or https://
Florent Viard authored on 2020/03/16 00:43:56... | ... |
@@ -363,6 +363,7 @@ test_s3cmd("Create one bucket", ['mb', pbucket(1)], |
363 | 363 |
must_find = "Bucket '%s/' created" % pbucket(1)) |
364 | 364 |
|
365 | 365 |
|
366 |
+ |
|
366 | 367 |
## ====== Create multiple buckets |
367 | 368 |
test_s3cmd("Create multiple buckets", ['mb', pbucket(2), pbucket(3)], |
368 | 369 |
must_find = [ "Bucket '%s/' created" % pbucket(2), "Bucket '%s/' created" % pbucket(3)]) |
... | ... |
@@ -376,9 +377,8 @@ test_s3cmd("Invalid bucket name", ["mb", "--bucket-location=EU", pbucket('EU')], |
376 | 376 |
|
377 | 377 |
|
378 | 378 |
## ====== Buckets list |
379 |
-# Modified for Minio |
|
380 | 379 |
test_s3cmd("Buckets list", ["ls"], |
381 |
- must_find = [ "autotest-1", "autotest-2", "autotest-3" ], must_not_find_re = "autotest-EU") |
|
380 |
+ must_find = [ pbucket(1), pbucket(2), pbucket(3) ], must_not_find_re = pbucket('EU')) |
|
382 | 381 |
|
383 | 382 |
|
384 | 383 |
## ====== Sync to S3 |
... | ... |
@@ -474,7 +474,6 @@ if have_encoding: |
474 | 474 |
test_s3cmd("Sync from S3", ['sync', '%s/xyz' % pbucket(1), 'testsuite-out'], |
475 | 475 |
must_find = must_find) |
476 | 476 |
|
477 |
- |
|
478 | 477 |
## ====== Remove 'demo' directory |
479 | 478 |
test_rmdir("Remove 'dir-test/'", "testsuite-out/xyz/dir-test/") |
480 | 479 |
|
... | ... |
@@ -615,7 +615,7 @@ test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % p |
615 | 615 |
test_s3cmd("Verify ACL and MIME type", ['info', '%s/copy/etc2/Logo.PNG' % pbucket(2) ], |
616 | 616 |
must_find_re = [ "MIME type:.*image/png", |
617 | 617 |
"ACL:.*\*anon\*: READ", |
618 |
- "URL:.*http://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
618 |
+ "URL:.*https?://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
619 | 619 |
|
620 | 620 |
## ====== modify MIME type |
621 | 621 |
test_s3cmd("Modify MIME type", ['modify', '--mime-type=binary/octet-stream', '%s/copy/etc2/Logo.PNG' % pbucket(2) ]) |
... | ... |
@@ -623,14 +623,14 @@ test_s3cmd("Modify MIME type", ['modify', '--mime-type=binary/octet-stream', '%s |
623 | 623 |
test_s3cmd("Verify ACL and MIME type", ['info', '%s/copy/etc2/Logo.PNG' % pbucket(2) ], |
624 | 624 |
must_find_re = [ "MIME type:.*binary/octet-stream", |
625 | 625 |
"ACL:.*\*anon\*: READ", |
626 |
- "URL:.*http://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
626 |
+ "URL:.*https?://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
627 | 627 |
|
628 | 628 |
test_s3cmd("Modify MIME type back", ['modify', '--mime-type=image/png', '%s/copy/etc2/Logo.PNG' % pbucket(2) ]) |
629 | 629 |
|
630 | 630 |
test_s3cmd("Verify ACL and MIME type", ['info', '%s/copy/etc2/Logo.PNG' % pbucket(2) ], |
631 | 631 |
must_find_re = [ "MIME type:.*image/png", |
632 | 632 |
"ACL:.*\*anon\*: READ", |
633 |
- "URL:.*http://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
633 |
+ "URL:.*https?://%s.%s/copy/etc2/Logo.PNG" % (bucket(2), cfg.host_base) ]) |
|
634 | 634 |
|
635 | 635 |
test_s3cmd("Add cache-control header", ['modify', '--add-header=cache-control: max-age=3600, public', '%s/copy/etc2/Logo.PNG' % pbucket(2) ], |
636 | 636 |
must_find_re = [ "modify: .*" ]) |