Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Yehuda Sadeh
0e4d198cac requirements.txt: work around pip 1.4 issue
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 48ba5dafc4)
2013-07-31 12:36:36 -07:00
Matthew Wodrich
125fc8bddd generate_objects: use rewind=True in upload_objects
Use the rewind=True argument when uploading objects to make
realistic.py's use of upload_objects compatible with boto>=2.4.1, which
will try to seek to the end of the fp if rewind is not True.
2013-03-01 16:04:35 -08:00
Yehuda Sadeh
e473dd5cb5 test_s3: fix test_list_multipart_upload
test wasn't really testing what it should have

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-02-19 17:58:54 -08:00
3 changed files with 14 additions and 3 deletions

View file

@ -6,5 +6,5 @@ bunch >=1.0.0
gevent ==0.13.6
isodate >=0.4.4
requests ==0.14.0
pytz
pytz >=2011k
ordereddict

View file

@ -3889,11 +3889,22 @@ def test_list_multipart_upload():
bucket = get_new_bucket()
key="mymultipart"
upload1 = _multipart_upload(bucket, key, 5, 1)
upload2 = _multipart_upload(bucket, key, 5, 1)
upload2 = _multipart_upload(bucket, key, 6, 1)
key2="mymultipart2"
upload3 = _multipart_upload(bucket, key2, 5, 1)
l = bucket.list_multipart_uploads()
l = list(l)
index = dict([(key, 2), (key2, 1)])
for upload in l:
index[upload.key_name] -= 1;
for k, c in index.items():
eq(c, 0)
upload1.cancel_upload()
upload2.cancel_upload()
upload3.cancel_upload()

View file

@ -46,7 +46,7 @@ def upload_objects(bucket, files, seed):
print >> sys.stderr, 'sending file with size %dB' % fp.size
key = Key(bucket)
key.key = name_generator.next()
key.set_contents_from_file(fp)
key.set_contents_from_file(fp, rewind=True)
key.set_acl('public-read')
keys.append(key)