git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/branches/amax-follow-symlinks@428 830e0280-6d2a-0410-9c65-932aecc39d9d
... | ... |
@@ -12,14 +12,6 @@ import re |
12 | 12 |
from subprocess import Popen, PIPE, STDOUT |
13 | 13 |
import locale |
14 | 14 |
|
15 |
-# Set up options |
|
16 |
-# from optparse import OptionParser |
|
17 |
-# optparser = OptionParser() |
|
18 |
-# optparser.add_option("-p", "--bucket-prefix", dest="bucket_prefix", default="", |
|
19 |
-# help="Prefix for names of test buckets (to make them unique)") |
|
20 |
-# (options, args) = optparser.parse_args() |
|
21 |
- |
|
22 |
- |
|
23 | 15 |
count_pass = 0 |
24 | 16 |
count_fail = 0 |
25 | 17 |
count_skip = 0 |
... | ... |
@@ -393,16 +385,21 @@ test_s3cmd("Recursive copy, set ACL", ['cp', '-r', '--acl-public', '%s/xyz/' % p |
393 | 393 |
must_not_find = [ ".svn" ]) |
394 | 394 |
|
395 | 395 |
## ====== Don't Put symbolic link |
396 |
-test_s3cmd("Put symbolic links", ['put', 'testsuite/etc/linked1.png', 's3://%s/xyz/' % bucket(1),], |
|
396 |
+test_s3cmd("Don't put symbolic links", ['put', 'testsuite/etc/linked1.png', 's3://%s/xyz/' % bucket(1),], |
|
397 | 397 |
must_not_find_re = [ "linked1.png"]) |
398 | 398 |
|
399 | 399 |
## ====== Put symbolic link |
400 | 400 |
test_s3cmd("Put symbolic links", ['put', 'testsuite/etc/linked1.png', 's3://%s/xyz/' % bucket(1),'--follow-symlinks' ], |
401 |
- must_find_re = [ "linked1.png"]) |
|
401 |
+ must_find = [ "File 'testsuite/etc/linked1.png' stored as '%s/xyz/linked1.png'" % pbucket(1)]) |
|
402 | 402 |
|
403 | 403 |
## ====== Sync symbolic links |
404 | 404 |
test_s3cmd("Sync symbolic links", ['sync', 'testsuite/', 's3://%s/xyz/' % bucket(1), '--no-encrypt', '--follow-symlinks' ], |
405 |
- must_find_re = [ "linked.png"]) |
|
405 |
+ must_find = ["File 'testsuite/etc/linked.png' stored as '%s/xyz/etc/linked.png'" % pbucket(1), |
|
406 |
+ "File 'testsuite/etc/more/give-me-more.txt' stored as '%s/xyz/etc/more/give-me-more.txt'" % pbucket(1)], |
|
407 |
+ # Don't want to recursively copy linked directories! |
|
408 |
+ must_not_find_re = ["etc/more/linked-dir/more/give-me-more.txt", |
|
409 |
+ "etc/brokenlink.png"], |
|
410 |
+ ) |
|
406 | 411 |
|
407 | 412 |
## ====== Verify ACL and MIME type |
408 | 413 |
test_s3cmd("Verify ACL and MIME type", ['info', '%s/copy/etc2/Logo.PNG' % pbucket(2) ], |