git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@304 830e0280-6d2a-0410-9c65-932aecc39d9d
Michal Ludvig authored on 2008/12/29 21:29:54... | ... |
@@ -41,7 +41,8 @@ def test(label, cmd_args = [], retcode = 0, must_find = [], must_not_find = [], |
41 | 41 |
print "----" |
42 | 42 |
print stdout |
43 | 43 |
print "----" |
44 |
- return 1 |
|
44 |
+ #return 1 |
|
45 |
+ sys.exit(1) |
|
45 | 46 |
def success(message = ""): |
46 | 47 |
global count_pass |
47 | 48 |
if message: |
... | ... |
@@ -186,7 +187,7 @@ test_s3cmd("Buckets list", ["ls"], |
186 | 186 |
|
187 | 187 |
## ====== Sync to S3 |
188 | 188 |
exclude_unicode_args = [] |
189 |
-if have_unicode: |
|
189 |
+if not have_unicode: |
|
190 | 190 |
exclude_unicode_args = [ '--exclude', 'unicode/*' ] |
191 | 191 |
test_s3cmd("Sync to S3", ['sync', 'testsuite', 's3://s3cmd-autotest-1/xyz/', '--exclude', '.svn/*', '--exclude', '*.png', '--no-encrypt'] + exclude_unicode_args) |
192 | 192 |
|
... | ... |
@@ -253,6 +254,13 @@ test_s3cmd("Rename (NoSuchKey)", ['mv', 's3://s3cmd-autotest-1/xyz/etc/logo.png' |
253 | 253 |
must_not_find = [ 'Object s3://s3cmd-autotest-1/xyz/etc/logo.png moved to s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG' ]) |
254 | 254 |
|
255 | 255 |
|
256 |
+## ====== Sync more from S3 |
|
257 |
+test_s3cmd("Sync more from S3", ['sync', '--delete-removed', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'], |
|
258 |
+ must_find = [ "deleted 'testsuite-out/etc/logo.png'", "stored as testsuite-out/etc2/Logo.PNG (22059 bytes", |
|
259 |
+ "stored as testsuite-out/.svn/format " ], |
|
260 |
+ must_not_find_re = [ "not-deleted.*etc/logo.png" ]) |
|
261 |
+ |
|
262 |
+ |
|
256 | 263 |
## ====== Make dst dir for get |
257 | 264 |
test_rmdir("Remove dst dir for get", "testsuite-out") |
258 | 265 |
|
... | ... |
@@ -272,13 +280,6 @@ test_s3cmd("Get multiple files", ['get', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PN |
272 | 272 |
must_find = [ u"saved as 'testsuite-out/Logo.PNG'", u"saved as 'testsuite-out/AtomicClockRadio.ttf'" ]) |
273 | 273 |
|
274 | 274 |
|
275 |
-## ====== Sync more from S3 |
|
276 |
-test_s3cmd("Sync more from S3", ['sync', '--delete-removed', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'], |
|
277 |
- must_find = [ "deleted 'testsuite-out/etc/logo.png'", "stored as testsuite-out/etc2/Logo.PNG (22059 bytes", |
|
278 |
- "stored as testsuite-out/.svn/format " ], |
|
279 |
- must_not_find_re = [ "not-deleted.*etc/logo.png" ]) |
|
280 |
- |
|
281 |
- |
|
282 | 275 |
## ====== Copy between buckets |
283 | 276 |
test_s3cmd("Copy between buckets", ['cp', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG', 's3://s3cmd-Autotest-3'], |
284 | 277 |
must_find = [ "Object s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG copied to s3://s3cmd-Autotest-3/xyz/etc2/Logo.PNG" ]) |