Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 335 lines (255 sloc) 11.26 kb
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
1 #!/usr/bin/env python
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
2 # -*- coding=utf-8 -*-
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
3
4 ## Amazon S3cmd - testsuite
5 ## Author: Michal Ludvig <michal@logix.cz>
6 ## http://www.logix.cz/michal
7 ## License: GPL Version 2
8
9 import sys
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
10 import os
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
11 import re
12 from subprocess import Popen, PIPE, STDOUT
f891a81 @mludvig * run-tests.py: Don't assume utf-8, use preferred encoding
mludvig authored
13 import locale
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
14
15 count_pass = 0
16 count_fail = 0
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
17 count_skip = 0
18
19 test_counter = 0
20 run_tests = []
21 exclude_tests = []
22
23 if os.name == "posix":
24 have_wget = True
25 elif os.name == "nt":
26 have_wget = False
27 else:
28 print "Unknown platform: %s" % os.name
29 sys.exit(1)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
30
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
31 ## Patterns for Unicode tests
32 patterns = {}
33 patterns['UTF-8'] = u"ŪņЇЌœđЗ/☺ unicode € rocks ™"
34 patterns['GBK'] = u"12月31日/1-特色條目"
35
36 encoding = locale.getpreferredencoding()
37 if not encoding:
38 print "Guessing current system encoding failed. Consider setting $LANG variable."
39 sys.exit(1)
5f7a2d5 @mludvig * s3cmd: Reworked internal handling of unicode vs encoded filenames.
mludvig authored
40 else:
41 print "System encoding: " + encoding
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
42
43 have_encoding = os.path.isdir('testsuite/encodings/' + encoding)
44 if not have_encoding and os.path.isfile('testsuite/encodings/%s.tar.gz' % encoding):
5f7a2d5 @mludvig * s3cmd: Reworked internal handling of unicode vs encoded filenames.
mludvig authored
45 os.system("tar xvz -C testsuite/encodings -f testsuite/encodings/%s.tar.gz" % encoding)
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
46 have_encoding = os.path.isdir('testsuite/encodings/' + encoding)
47
48 if have_encoding:
49 enc_base_remote = "s3://s3cmd-autotest-1/xyz/%s/" % encoding
50 enc_pattern = patterns[encoding]
5f7a2d5 @mludvig * s3cmd: Reworked internal handling of unicode vs encoded filenames.
mludvig authored
51 else:
52 print encoding + " specific files not found."
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
53
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
54 def test(label, cmd_args = [], retcode = 0, must_find = [], must_not_find = [], must_find_re = [], must_not_find_re = []):
55 def failure(message = ""):
56 global count_fail
57 if message:
f891a81 @mludvig * run-tests.py: Don't assume utf-8, use preferred encoding
mludvig authored
58 message = " (%r)" % message
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
59 print "\x1b[31;1mFAIL%s\x1b[0m" % (message)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
60 count_fail += 1
61 print "----"
62 print " ".join([arg.find(" ")>=0 and "'%s'" % arg or arg for arg in cmd_args])
63 print "----"
64 print stdout
65 print "----"
257d632 @mludvig * run-tests.py: Exit on failed test. Fixed order of tests.
mludvig authored
66 #return 1
67 sys.exit(1)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
68 def success(message = ""):
69 global count_pass
70 if message:
f891a81 @mludvig * run-tests.py: Don't assume utf-8, use preferred encoding
mludvig authored
71 message = " (%r)" % message
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
72 print "\x1b[32;1mOK\x1b[0m%s" % (message)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
73 count_pass += 1
74 return 0
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
75 def skip(message = ""):
76 global count_skip
77 if message:
f891a81 @mludvig * run-tests.py: Don't assume utf-8, use preferred encoding
mludvig authored
78 message = " (%r)" % message
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
79 print "\x1b[33;1mSKIP\x1b[0m%s" % (message)
80 count_skip += 1
81 return 0
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
82 def compile_list(_list, regexps = False):
83 if type(_list) not in [ list, tuple ]:
84 _list = [_list]
85
86 if regexps == False:
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
87 _list = [re.escape(item.encode(encoding, "replace")) for item in _list]
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
88
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
89 return [re.compile(item, re.MULTILINE) for item in _list]
90
91 global test_counter
92 test_counter += 1
93 print ("%3d %s " % (test_counter, label)).ljust(30, "."),
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
94 sys.stdout.flush()
95
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
96 if run_tests.count(test_counter) == 0 or exclude_tests.count(test_counter) > 0:
97 return skip()
98
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
99 p = Popen(cmd_args, stdout = PIPE, stderr = STDOUT, universal_newlines = True)
100 stdout, stderr = p.communicate()
101 if retcode != p.returncode:
102 return failure("retcode: %d, expected: %d" % (p.returncode, retcode))
103
104 find_list = []
105 find_list.extend(compile_list(must_find))
106 find_list.extend(compile_list(must_find_re, regexps = True))
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
107 find_list_patterns = []
108 find_list_patterns.extend(must_find)
109 find_list_patterns.extend(must_find_re)
110
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
111 not_find_list = []
112 not_find_list.extend(compile_list(must_not_find))
113 not_find_list.extend(compile_list(must_not_find_re, regexps = True))
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
114 not_find_list_patterns = []
115 not_find_list_patterns.extend(must_not_find)
116 not_find_list_patterns.extend(must_not_find_re)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
117
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
118 for index in range(len(find_list)):
119 match = find_list[index].search(stdout)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
120 if not match:
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
121 return failure("pattern not found: %s" % find_list_patterns[index])
122 for index in range(len(not_find_list)):
123 match = not_find_list[index].search(stdout)
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
124 if match:
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
125 return failure("pattern found: %s (match: %s)" % (not_find_list_patterns[index], match.group(0)))
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
126 return success()
127
128 def test_s3cmd(label, cmd_args = [], **kwargs):
129 if not cmd_args[0].endswith("s3cmd"):
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
130 cmd_args.insert(0, "python")
131 cmd_args.insert(1, "s3cmd")
132
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
133 return test(label, cmd_args, **kwargs)
134
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
135 def test_mkdir(label, dir_name):
136 if os.name in ("posix", "nt"):
137 cmd = ['mkdir']
138 else:
139 print "Unknown platform: %s" % os.name
140 sys.exit(1)
141 cmd.append(dir_name)
142 return test(label, cmd)
143
144 def test_rmdir(label, dir_name):
145 if os.path.isdir(dir_name):
146 if os.name == "posix":
147 cmd = ['rm', '-rf']
148 elif os.name == "nt":
149 cmd = ['rmdir', '/s/q']
150 else:
151 print "Unknown platform: %s" % os.name
152 sys.exit(1)
153 cmd.append(dir_name)
154 return test(label, cmd)
155
156
157 argv = sys.argv[1:]
158 while argv:
159 arg = argv.pop(0)
160 if arg in ("-h", "--help"):
161 print "%s A B K..O -N" % sys.argv[0]
162 print "Run tests number A, B and K through to O, except for N"
163 sys.exit(0)
164 if arg in ("-l", "--list"):
165 exclude_tests = range(0, 999)
166 break
167 if arg.find("..") >= 0:
168 range_idx = arg.find("..")
169 range_start = arg[:range_idx] or 0
170 range_end = arg[range_idx+2:] or 999
171 run_tests.extend(range(int(range_start), int(range_end) + 1))
172 elif arg.startswith("-"):
173 exclude_tests.append(int(arg[1:]))
174 else:
175 run_tests.append(int(arg))
176
177 if not run_tests:
178 run_tests = range(0, 999)
179
180 ## ====== Remove test buckets
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
181 test_s3cmd("Remove test buckets", ['rb', '-r', 's3://s3cmd-autotest-1', 's3://s3cmd-autotest-2', 's3://s3cmd-Autotest-3'],
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
182 must_find = [ "Bucket 's3://s3cmd-autotest-1/' removed",
183 "Bucket 's3://s3cmd-autotest-2/' removed",
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
184 "Bucket 's3://s3cmd-Autotest-3/' removed" ])
185
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
186
187 ## ====== Create one bucket (EU)
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
188 test_s3cmd("Create one bucket (EU)", ['mb', '--bucket-location=EU', 's3://s3cmd-autotest-1'],
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
189 must_find = "Bucket 's3://s3cmd-autotest-1/' created")
190
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
191
192
193 ## ====== Create multiple buckets
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
194 test_s3cmd("Create multiple buckets", ['mb', 's3://s3cmd-autotest-2', 's3://s3cmd-Autotest-3'],
195 must_find = [ "Bucket 's3://s3cmd-autotest-2/' created", "Bucket 's3://s3cmd-Autotest-3/' created" ])
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
196
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
197
198 ## ====== Invalid bucket name
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
199 test_s3cmd("Invalid bucket name", ["mb", "--bucket-location=EU", "s3://s3cmd-Autotest-EU"],
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
200 retcode = 1,
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
201 must_find = "ERROR: Parameter problem: Bucket name 's3cmd-Autotest-EU' contains disallowed character",
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
202 must_not_find_re = "Bucket.*created")
203
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
204
205 ## ====== Buckets list
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
206 test_s3cmd("Buckets list", ["ls"],
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
207 must_find = [ "autotest-1", "autotest-2", "Autotest-3" ], must_not_find_re = "Autotest-EU")
208
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
209
210 ## ====== Sync to S3
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
211 test_s3cmd("Sync to S3", ['sync', 'testsuite', 's3://s3cmd-autotest-1/xyz/', '--exclude', '.svn/*', '--exclude', '*.png', '--no-encrypt', '--exclude-from', 'testsuite/exclude.encodings' ])
212
213 if have_encoding:
214 ## ====== Sync UTF-8 / GBK / ... to S3
215 test_s3cmd("Sync %s to S3" % encoding, ['sync', 'testsuite/encodings/' + encoding, enc_base_remote, '--exclude', '.svn/*', '--no-encrypt' ])
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
216
217
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
218 ## ====== List bucket content
219 must_find_re = [ u"D s3://s3cmd-autotest-1/xyz/binary/$", u"D s3://s3cmd-autotest-1/xyz/etc/$" ]
220 must_not_find = [ u"random-crap.md5", u".svn" ]
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
221 if have_encoding:
222 must_find_re.append(u"D %s$" % enc_base_remote)
223 must_not_find.append(enc_pattern)
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
224 test_s3cmd("List bucket content", ['ls', 's3://s3cmd-autotest-1/xyz/'],
225 must_find_re = must_find_re,
226 must_not_find = must_not_find)
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
227
228
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
229 ## ====== List bucket recursive
230 must_find = [ u"s3://s3cmd-autotest-1/xyz/binary/random-crap.md5" ]
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
231 if have_encoding:
232 must_find.append(enc_base_remote + enc_pattern)
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
233 test_s3cmd("List bucket recursive", ['ls', '--recursive', 's3://s3cmd-autotest-1'],
234 must_find = must_find,
235 must_not_find = [ "logo.png" ])
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
236
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
237 ## ====== FIXME
238 # test_s3cmd("Recursive put", ['put', '--recursive', 'testsuite/etc', 's3://s3cmd-autotest-1/xyz/'])
9856527 @mludvig * s3cmd, run-tests.py: Make it work on Windows.
mludvig authored
239
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
240
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
241 ## ====== Put public, guess MIME
242 test_s3cmd("Put public, guess MIME", ['put', '--guess-mime-type', '--acl-public', 'testsuite/etc/logo.png', 's3://s3cmd-autotest-1/xyz/etc/logo.png'],
243 must_find = [ "stored as s3://s3cmd-autotest-1/xyz/etc/logo.png" ])
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
244
416741b @mludvig Fixes for non-recursive 'ls' support from previous commit.
mludvig authored
245
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
246 ## ====== rmdir local
247 test_rmdir("Removing local target", 'testsuite-out')
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
248
249
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
250 ## ====== Sync from S3
251 must_find = [ "stored as testsuite-out/etc/logo.png " ]
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
252 if have_encoding:
253 must_find.append("stored as testsuite-out/" + encoding + "/" + enc_pattern)
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
254 test_s3cmd("Sync from S3", ['sync', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'],
255 must_find = must_find)
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
256
257
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
258 ## ====== Retrieve from URL
259 if have_wget:
260 test("Retrieve from URL", ['wget', 'http://s3cmd-autotest-1.s3.amazonaws.com/xyz/etc/logo.png'],
261 must_find_re = [ 'logo.png.*saved \[22059/22059\]' ])
262
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
263
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
264 ## ====== Sync more to S3
5f7a2d5 @mludvig * s3cmd: Reworked internal handling of unicode vs encoded filenames.
mludvig authored
265 test_s3cmd("Sync more to S3", ['sync', 'testsuite', 's3://s3cmd-autotest-1/xyz/', '--no-encrypt' ])
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
266
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
267
268 ## ====== Rename within S3
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
269 test_s3cmd("Rename within S3", ['mv', 's3://s3cmd-autotest-1/xyz/etc/logo.png', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG'],
270 must_find = [ 'Object s3://s3cmd-autotest-1/xyz/etc/logo.png moved to s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG' ])
271
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
272
273 ## ====== Rename (NoSuchKey)
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
274 test_s3cmd("Rename (NoSuchKey)", ['mv', 's3://s3cmd-autotest-1/xyz/etc/logo.png', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG'],
275 retcode = 1,
276 must_find_re = [ 'ERROR:.*NoSuchKey' ],
277 must_not_find = [ 'Object s3://s3cmd-autotest-1/xyz/etc/logo.png moved to s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG' ])
278
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
279
257d632 @mludvig * run-tests.py: Exit on failed test. Fixed order of tests.
mludvig authored
280 ## ====== Sync more from S3
281 test_s3cmd("Sync more from S3", ['sync', '--delete-removed', 's3://s3cmd-autotest-1/xyz', 'testsuite-out'],
282 must_find = [ "deleted 'testsuite-out/etc/logo.png'", "stored as testsuite-out/etc2/Logo.PNG (22059 bytes",
283 "stored as testsuite-out/.svn/format " ],
284 must_not_find_re = [ "not-deleted.*etc/logo.png" ])
285
286
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
287 ## ====== Make dst dir for get
288 test_rmdir("Remove dst dir for get", "testsuite-out")
289
290
291 ## ====== Get multiple files
292 test_s3cmd("Get multiple files", ['get', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG', 's3://s3cmd-autotest-1/xyz/etc/AtomicClockRadio.ttf', 'testsuite-out'],
293 retcode = 1,
294 must_find = [ 'Destination must be a directory when downloading multiple sources.' ])
295
296
297 ## ====== Make dst dir for get
298 test_mkdir("Make dst dir for get", "testsuite-out")
299
300
301 ## ====== Get multiple files
302 test_s3cmd("Get multiple files", ['get', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG', 's3://s3cmd-autotest-1/xyz/etc/AtomicClockRadio.ttf', 'testsuite-out'],
303 must_find = [ u"saved as 'testsuite-out/Logo.PNG'", u"saved as 'testsuite-out/AtomicClockRadio.ttf'" ])
304
305
306 ## ====== Copy between buckets
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
307 test_s3cmd("Copy between buckets", ['cp', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG', 's3://s3cmd-Autotest-3'],
308 must_find = [ "Object s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG copied to s3://s3cmd-Autotest-3/xyz/etc2/Logo.PNG" ])
309
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
310
311 ## ====== Simple delete
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
312 test_s3cmd("Simple delete", ['del', 's3://s3cmd-autotest-1/xyz/etc2/Logo.PNG'],
313 must_find = [ "Object s3://s3cmd-autotest-1/xyz/etc2/Logo.PNG deleted" ])
314
315
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
316 ## ====== Recursive delete
4986ae8 @mludvig * run-tests.py: Adapted to the above change.
mludvig authored
317 test_s3cmd("Recursive delete", ['del', '--recursive', 's3://s3cmd-autotest-1/xyz/etc'],
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
318 must_find_re = [ "Object.*\.svn/format deleted" ])
319
320
321 ## ====== Recursive delete all
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
322 test_s3cmd("Recursive delete all", ['del', '--recursive', '--force', 's3://s3cmd-autotest-1'],
323 must_find_re = [ "Object.*binary/random-crap deleted" ])
324
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
325
326 ## ====== Remove empty bucket
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
327 test_s3cmd("Remove empty bucket", ['rb', 's3://s3cmd-autotest-1'],
328 must_find = [ "Bucket 's3://s3cmd-autotest-1/' removed" ])
330c51e @mludvig * testsuite, run-tests.py: Added testsuite with first few tests.
mludvig authored
329
ca86524 @mludvig * run-tests.py: Improved testsuite, added parameters support
mludvig authored
330
331 ## ====== Remove remaining buckets
f11319b @mludvig * run-tests.py: Added a lot of new tests.
mludvig authored
332 test_s3cmd("Remove remaining buckets", ['rb', '--recursive', 's3://s3cmd-autotest-2', 's3://s3cmd-Autotest-3'],
333 must_find = [ "Bucket 's3://s3cmd-autotest-2/' removed",
334 "Bucket 's3://s3cmd-Autotest-3/' removed" ])
Something went wrong with that request. Please try again.