Commit graph

25 commits

Author SHA1 Message Date
Robin H. Johnson
e0655234b1 Lots of tests, that pass on AmazonS3 unless the phase of the moon is wrong. There is a non-trivial degree of lag in S3 applying WebsiteConfiguration changes sometimes, eu-west-1 was taking 20+ seconds during part of the last day. Compounded by the Amazon eventual-consistency made developing these tests difficult at times.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-04-20 16:08:57 -07:00
Robin H. Johnson
a48a8983b7 refactor out _make_request and _make_bucket_request, with a common _make_raw_request; ready for s3website testing.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-04-20 16:08:57 -07:00
Robin H. Johnson
3cf86161d0 Use py3 print.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-04-20 16:08:57 -07:00
Robin H. Johnson
de65c582b7 s3tests: do not exit cleanup after first bucket!
Bucket cleanup code was exiting after the first succesful bucket
removed, instead of cleaning up all buckets. This left many buckets
behind over time, causing large slowdowns of the test suite.

This was introduced in commit c41ebab9cf,
when changes for versioned files were added.

Signed-off-by: Kobi Laredo <kobi.laredo@dreamhost.com>
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
Backport: hammer
2015-12-01 17:28:23 -08:00
Andrew Gaul
31efb46b28 Handle empty bucket while nuking
Signed-off-by: Andrew Gaul <andrew@gaul.org>
2015-05-01 13:10:58 -07:00
Andrew Gaul
0dfcbc7da6 Fall back when nuking buckets
Some S3 implementations do not support object versioning - fall back
to listing without versions.

Signed-off-by: Andrew Gaul <andrew@gaul.org>
2015-04-24 14:47:28 -07:00
Yehuda Sadeh
c41ebab9cf s3tests: cleanup, set bucket acls if permission denied
retry bucket removal after setting the bucket permissions if we're
getting pemission denied. This will make sure the bucket gets removed.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2015-04-24 13:51:21 -07:00
Yehuda Sadeh
0f0e833801 s3tests: add test_versioning_obj_create_read_remove()
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-19 15:07:53 -08:00
Yehuda Sadeh
d4e9e40792 teardown: clean object versions
also don't set acls on buckets, objects before removing, no need for
that.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-19 15:07:53 -08:00
Yehuda Sadeh
97beb9c816 test_s3: add is_slow_backend
for slow ec region copy

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-10-03 15:09:27 -07:00
Joe Buck
ad9f3615e3 fix nuke_buckets for non-region tests
Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-08-30 23:47:54 -07:00
Joe Buck
15f7fcfc84 Rework nuke_buckets
Nuke all buckets on the master, sync, and then
nuke any remaining buckets on non-master regions.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-30 22:13:34 -07:00
Joe Buck
703e66d547 Add support for default_region
Changes to actually use the
'default_region' setting in the
S3TEST_CONF file.
Previously, the first connection set
was assumed to be the default.
This means that the parse order
of the S3TEST_CONF file was dictating
how the tests behaved, resulting in
failures in some cases.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-28 08:56:26 -07:00
Yehuda Sadeh
3b733245c5 s3tests: modify cross region copy, sync triggering
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 22:19:36 -07:00
Yehuda Sadeh
b4441e3057 s3tests: improve cross region copy, sync meta
Can now configure sync agent rest address in order to force
a sync operation. Another option is to set a waiting time for
meta sync.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 20:33:48 -07:00
Yehuda Sadeh
0fb067de30 s3tests: some more multiregion changes
Now creating a connection per region for each user, can access
master and secondaries, and set a default region.
No longer using a specific region per user, as it doesn't
make sense.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 10:48:45 -07:00
Yehuda Sadeh
99d3b4928d set the region is_master field
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 16:44:41 -07:00
Yehuda Sadeh
1c6b1ba1f6 rearrange regions info container
Now able to easily get the master and secondaries

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 16:43:19 -07:00
Yehuda Sadeh
232dd35817 add flexible multi-region configuration
can now create a region-specific configuration:

[region foo]
api_name = ...
host = ...
port = ...

and set that region to be used for specific connection:

[s3 main]
region = foo

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 14:13:34 -07:00
Yehuda Sadeh
c40b1cd348 support region configuration
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-24 13:23:24 -07:00
Matthew Wodrich
c4bded31c2 add calling_format switch in functional and common
Add calling_format switch with options ordinary, subdomain, and vhost to
s3tests/functional/__init__.py and /s3tests/common.py to allow the use
of OrdinaryCallingFormat, SubdomainCallingFormat, and VHostCallingFormat
in the config files for the nosetests and the tools using the common
parser.
2011-11-03 10:22:23 -07:00
Tommi Virtanen
5b250e57e1 Let nose run s3tests in parallel.
This decreases the run time significantly.

Unfortunately, there seem to be cleanup-related bugs
in parallel runs for now. It's not safe to actually
run with --processes=N >1 yet, but at least the right
magic incantation is now recorded.
2011-10-13 13:35:56 -07:00
Tommi Virtanen
91a39caf46 Fix bug where prefix was None.
Accessing a non-constant global from another module is tricky,
as the import binds to the original object. Rebinding the name
in the original module does not change it in importers. Use a
getter as a quick workaround.
2011-07-13 14:49:07 -07:00
Tommi Virtanen
33b25c577e Move setup/teardown into s3tests.functional __init__, to share across modules. 2011-07-11 15:24:39 -07:00
Tommi Virtanen
e9ad6f7ee6 Move test_s3 into s3tests.functional, so it can be split to multiple files nicely. 2011-07-11 15:24:39 -07:00