Commit graph

524 commits

Author SHA1 Message Date
Yehuda Sadeh
3c297038f6 s3tests: more object versioning tests
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-19 15:07:54 -08:00
Yehuda Sadeh
a3ce6be105 s3tests: object version removal and delete marker test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-19 15:07:54 -08:00
Yehuda Sadeh
5d67c7f5df s3tests: extend object versions test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-19 15:07:54 -08: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
032f41f6f3 functional: add test_versioning_bucket_create_suspend()
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
2f279540f9 s3tests: send raw http requests to test redirects
Since we fixed the rgw redirect code, it turns out that boto actually
follows on them. We just want to check if redirect is sent.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2015-01-13 16:46:33 -08:00
Andrew Gaul
c280ade220 Do not check error_code with empty content length
This matches test_bucket_create_bad_contentlength_negative.
2015-01-06 13:54:15 -08:00
Andrew Gaul
bb0a88fd1b Use unique name in starts with nonalpha test 2015-01-06 13:43:09 -08:00
Andrew Gaul
d978adbf2d Add test for aborting a bogus multi-part upload 2015-01-02 19:29:53 -08:00
Andrew Gaul
00f4ffed5a Ensure multi-delete removes keys 2014-12-31 15:50:14 -08:00
Andrew Gaul
2682a6a0eb Add test for keys with XML special characters 2014-12-30 15:55:35 -08:00
Andrew Gaul
ffdad9e22f Add test for querying location 2014-12-29 16:15:41 -08:00
Andrew Gaul
45c53c462d Handle idempotent and BucketAlreadyOwnedByYou
AWS S3 has two behaviors for recreating a bucket depending if you use
the us-standard or another region:

>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 499, in create_bucket
    response.status, response.reason, body)
boto.exception.S3CreateError: S3CreateError: 409 Conflict
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>BucketAlreadyOwnedByYou</Code><Message>Your previous request to create the named bucket succeeded and you already own it.</Message><BucketName>gaul-uswest</BucketName><RequestId>24B6DC3170365CD7</RequestId><HostId>hUynMTyqc9WZFxAJ2RFK6P7BqmmeHHlMl9xL2NOy56xBUnOZCAlHqGvtMeGeAfVs</HostId></Error>

Additional discussion:

https://issues.apache.org/jira/browse/JCLOUDS-334
2014-12-22 21:05:27 -08:00
Andrew Gaul
9b17da16cd Test to find mismatched MD5
Also clarify the invalid digest test.
2014-12-22 20:26:39 -08:00
Andrew Gaul
673f7d7c44 Test empty and small multi-part uploads 2014-12-22 20:17:35 -08:00
Andrew Gaul
ca2c0dc283 Correctly generate non-mod 1024 parts in generator
Also move implementation to utils and add unit tests.
2014-12-22 20:16:25 -08:00
Yehuda Sadeh
8f6c109882 test_object_create_bad_authorization_incorrect: fixes
The test should expect BadSignature. Also, provide a key that does not
already exist on aws.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-12-16 12:56:53 -08:00
Josh Durgin
d50dfe8fa3 Merge pull request #26 from ceph/wip-10066
fixes/improves weird hashing issues on readwrite tests

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2014-12-15 23:17:51 -08:00
Alfredo Deza
abc9e67120 Revert "test_bucket_create_exists should fail on recreate"
This reverts commit c82649b635.

The suite does not support duality in behaviors (e.g.
US Standard vs. Regional behavior) so we adhere to US
Standard only.

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-15 10:41:59 -05:00
Ray Lv
085277338f s3tests: add regression test for bug #10311 - rgw: Object is deleted automatically if conditional PUT returns 412
Test for bug #10311

Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
2014-12-15 16:47:34 +08:00
Alfredo Deza
a983b6b670 fix broken/commented tests
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-12 13:53:43 -05:00
Alfredo Deza
cad6547eb0 use the new helpers for realistic files
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-12 13:53:19 -05:00
Alfredo Deza
b4794edbb3 always seek back to 0, remove chunk usage
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-12 13:52:43 -05:00
Yehuda Sadeh
c6043faa30 Merge pull request #23 from xylv/wip-test-issue-8562
s3tests: add conditional put test

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2014-12-12 10:42:54 -08:00
Alfredo Deza
3390afc4a5 adding a new FileValidator
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-12 11:12:10 -05:00
Alfredo Deza
8ee55a32f5 new tests for the new pseudo-random content files
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-12 11:09:27 -05:00
Alfredo Deza
fc92b4925d adding a proof for the realistic bugs
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
2014-12-10 16:55:54 -05:00
Alfredo Deza
f07b5206a6 Merge pull request #19 from andrewgaul/query-string-authorization-expiration
Test query string authorization expiration
2014-12-04 09:43:25 -05:00
Alfredo Deza
7b5a61fa7f Merge pull request #17 from andrewgaul/delete-object-non-existent-bucket
Test delete object on non-existent bucket
2014-12-04 09:37:11 -05:00
Alfredo Deza
405d96c379 Merge pull request #24 from andrewgaul/list-bucket
Improve list bucket invalid and bad auth tests
2014-12-04 09:32:08 -05:00
Alfredo Deza
81dc4f4b24 Merge pull request #9 from andrewgaul/bucket-create-exists
test_bucket_create_exists should fail on recreate
2014-12-04 09:28:31 -05:00
Andrew Gaul
5a995a9e14 Improve list bucket invalid and bad auth tests
Explicitly test invalid access keys and valid access keys but invalid
secret keys.  Also disable anonymous list bucket test for AWS.
radosgw uses this for connectivity testing but AWS does not allow it:

http://ceph.com/docs/master/radosgw/config/#verify-the-runtime
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html
2014-12-03 20:42:23 -08:00
Ray Lv
3e1e2ee438 s3tests: add conditional put test
Test for issue #8562

Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
2014-11-25 14:51:38 +08:00
Josh Durgin
70db3015b9 Merge pull request #22 from ceph/wip-configurable-copy
test_s3: add is_slow_backend

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-10-20 13:45:39 -07:00
Yehuda Sadeh
f4de9f7b42 test_s3: fix test_list_multipart_upload()
Test was calling _multipart_upload() with extra useless param, this
broke when we added a new param to the function.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-10-14 14:16:30 -07:00
Luis Pabón
be982f624e Multipart test with 10k small objects.
Test detects that the server returns the correct error
code

Signed-off-by: Luis Pabón <lpabon@redhat.com>
2014-10-13 10:10:27 -04: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
Yehuda Sadeh
d2c0ccd7b5 readwrite: dump a more meaningful message on md5 read error
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-08-26 14:06:25 -07:00
Andrew Gaul
6aac86205a Test query string authorization expiration 2014-08-23 18:36:41 -07:00
Andrew Gaul
4adf87c7e3 Test that put object returns correct ETag 2014-08-22 11:13:57 -07:00
Andrew Gaul
870c19a44b Test delete object on non-existent bucket 2014-08-22 11:06:04 -07:00
Andrew Gaul
b81a718794 Test half-open range requests 2014-08-12 12:26:27 -07:00
Andrew Gaul
74a08169b1 Disable retries to test short writes
Previously test_object_create_bad_contentlength_mismatch_above failed
with:

Traceback (most recent call last):
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/gaul/work/s3-tests/s3tests/functional/test_headers.py", line 343, in test_object_create_bad_contentlength_mismatch_above
    e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_string, content)
  File "/home/gaul/work/s3-tests/s3tests/functional/utils.py", line 11, in assert_raises
    callableObj(*args, **kwargs)
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/s3/key.py", line 1379, in set_contents_from_string
    encrypt_key=encrypt_key)
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/s3/key.py", line 1246, in set_contents_from_file
    chunked_transfer=chunked_transfer, size=size)
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/s3/key.py", line 725, in send_file
    chunked_transfer=chunked_transfer, size=size)
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/s3/key.py", line 914, in _send_file_internal
    query_args=query_args
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/s3/connection.py", line 658, in make_request
    retry_handler=retry_handler
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/connection.py", line 1048, in make_request
    retry_handler=retry_handler)
  File "/home/gaul/work/s3-tests/virtualenv/local/lib/python2.7/site-packages/boto/connection.py", line 1004, in _mexe
    raise BotoServerError(response.status, response.reason, body)
BotoServerError: BotoServerError: 400 Bad Request
2014-08-01 21:47:13 -07:00
Andrew Gaul
3d3a4ce8fe Call get_new_bucket_name in long bucket name tests
Previously test_bucket_create_naming_good_long_251 and
test_bucket_list_long_name could fail with BucketAlreadyOwnedByYou.
2014-08-01 16:43:50 -07:00
Andrew Gaul
c82649b635 test_bucket_create_exists should fail on recreate
AWS S3 has two behaviors for recreating a bucket depending if you use
the us-standard or another region:

>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-default', location=Location.DEFAULT)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
>>> bucket = conn.create_bucket('gaul-uswest', location=Location.USWest)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 499, in create_bucket
    response.status, response.reason, body)
boto.exception.S3CreateError: S3CreateError: 409 Conflict
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>BucketAlreadyOwnedByYou</Code><Message>Your previous request to create the named bucket succeeded and you already own it.</Message><BucketName>gaul-uswest</BucketName><RequestId>24B6DC3170365CD7</RequestId><HostId>hUynMTyqc9WZFxAJ2RFK6P7BqmmeHHlMl9xL2NOy56xBUnOZCAlHqGvtMeGeAfVs</HostId></Error>

Additional discussion:

https://issues.apache.org/jira/browse/JCLOUDS-334
2014-07-31 01:35:21 -07:00
Yehuda Sadeh
a23c81187b test_s3: add bucket listing tests
Test prefix, delimiter, common prefixes, max_keys.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-07-22 16:59:58 -07:00
Yehuda Sadeh
b07fce46a0 rgw: add more multipart upload tests
Check for issue #8846.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-07-16 13:22:38 -07:00
Yehuda Sadeh
05f45c0fe9 s3tests: extende multipart upload test
Test for issue #8452

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2014-06-03 16:15:29 -07:00
Yehuda Sadeh
474bfd2077 test_s3: add some debug prints for multi region test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-04-01 12:24:53 -07:00
Yehuda Sadeh
f2902a042f test_s3: extend multipart test
Make test use a multipart upload with different part sizes, to exercise
code that triggered #7935.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-04-01 12:24:53 -07:00
Yehuda Sadeh
1b3d766621 test_s3: extend multi-delete test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2014-04-01 12:24:53 -07:00
Yehuda Sadeh
3fc4121f8b Merge branch 'next' 2013-09-06 21:54:46 -07:00
Yehuda Sadeh
dfe455b6f6 Merge branch 'wip-6078' into next 2013-09-06 21:54:25 -07:00
Yehuda Sadeh
b24fd7a099 rgw: extend cors tests
Checks all sort of issues related to #6078.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-09-04 16:45:00 -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
2a216abcb4 Moving region_sync to utils
Since other classes need to do syncs,
let's move it to the utils file.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-30 22:13:42 -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
e54c700bbd Improve post-test cleanup
The multi-region tests were not being diligent
about cleaning up their buckets / keys
and making sure that those deletes were synced.
This was causing the nuke_prefixed_buckets()
method to run into errors.
This patch adds more cleanup code and
validation of that cleanup within
the pertinent tests.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-08-28 22:48:48 -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
56665e7da5 rgw: more extensive CORS testing
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-27 19:47:07 -07:00
Joe Buck
b4b99d3e23 readwrite: add missing traceback object
An error code path was missing the traceback
object and was causing a key error when
that path was executed.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-08-26 13:58:59 -07:00
Yehuda Sadeh
a06f5784df Merge branch 'next'
Conflicts:
	s3tests/functional/test_s3.py

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-16 10:55:54 -07:00
Joe Buck
9799858e90 readwrite: error propagation code
This is my attempt at enabling errors
in the readwrite.py to propate up
to the calling teuthology task.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
2013-08-12 23:32:59 -07:00
Joe Buck
34a06133eb readwrite.py: adding parameters
Add an optional parameter to trigger deterministic
file name creation (for separate write/read tasks).
Also, change the behavior when zero writers
are specified to actually generate no data.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-08-12 23:32:55 -07:00
Yehuda Sadeh
f20c6e250e rename 'partial' metadata sync to 'incremental'
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-05 13:55:22 -07:00
Yehuda Sadeh
ef471ec2b9 s3tests: improve cors test to cover more functionality
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-01 13:24:28 -07:00
Yehuda Sadeh
7bdf4b897a test_s3: basic cors test
related to issue #5261

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-08-01 11:07:07 -07:00
Yehuda Sadeh
9954bc4470 s3tests: only tun multiregion tests if configured
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-29 13:17:46 -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
04d46c59f0 s3tests: basic test to copy object between regions
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 18:07:52 -07:00
Yehuda Sadeh
5f4910fad5 s3tests: test_region_bucket_create_secondary_access_master
first multi-region test

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-26 11:16:36 -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
ca72b6cb7b s3_test: add test for listing objects with special prefix
Check for ceph issue #5362. Prefix starts with underscore.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 21:53:33 -07:00
Yehuda Sadeh
a62df16023 test_s3: basic cors test
related to issue #5261

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-25 21:53:33 -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
Wyllys Ingersoll
30ed65e6ba Fixed contentlength_negative tests to ignore the error_code 2013-06-03 15:07:21 -04:00
Sage Weil
0380eafac0 Merge remote-tracking branch 'gh/next' 2013-05-06 21:36:43 -07:00
Matthew Wodrich
94cc7025fa 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 15:45:28 -08:00
Yehuda Sadeh
10a6caf4ee test_s3: reduce multipart tests sizes
Tests were dominating run time

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-02-20 13:55:35 -08:00
caleb miles
4095675827 test_s3: test multi-part uploads using boto provided functionality.
Tests the implementation of multi-part upload and verifies written
object.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2013-02-20 13:51:14 -08:00
caleb miles
27581ccf6a test_s3: Add test of ACL grants through HTTP headers.
Signed-off-by: caleb miles <caleb.miles@inktank.com>
2013-02-20 11:39:48 -08:00
Yehuda Sadeh
fd33286494 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 18:00:15 -08:00
caleb miles
b39f25a02b test_s3: Add tests for additional canned acl support.
Corresponds to tracker issue 3667.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2013-02-07 14:49:03 -08:00
Yehuda Sadeh
d4978eb4d1 test_s3: check stats correct after multipart upload
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-02-06 10:34:54 -08:00
Yehuda Sadeh
414a107b46 rgw: fix post tests to include tcp port
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-23 10:41:38 -08:00
Yehuda Sadeh
efa352711b rgw: remove more fails_on_dho tags
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-18 10:35:31 -08:00
Yehuda Sadeh
509715810d rgw: remove fails_on_dho tags
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-18 10:33:02 -08:00
Yehuda Sadeh
da7558e3ab test_s3: add test_object_copy_canned_acl
test copy object with canned acl modification

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-18 10:07:01 -08:00
Yehuda Sadeh
761d7f290f rgw: add missing fails_on_dho to post tests
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-18 09:57:01 -08:00
Yehuda Sadeh
83813602bc s3tests: fix post tests
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-18 09:37:21 -08:00
caleb miles
3b2c7b6b81 test_s3: Add tests of post object.
Tests the implementation of browser based uploads via a POST request.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2013-01-18 09:37:12 -08:00
caleb miles
834800f341 test_s3: Add a test of multi-object delete.
Tests the implementation of the multi-object delete function call.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
2012-08-28 13:42:08 -07:00
Yehuda Sadeh
09cdd45026 test_s3: add a test for response header modification
Testing response header fields modification by specified params.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 15:17:18 -07:00
Yehuda Sadeh
51450253a2 test_s3: remove extra code block
Code was duplicated by mistake. Removing it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-07-06 14:45:15 -07:00
Kyle Bader
09681c62dc Add strict RFC2616 attributes to metadata tests
Some proxies/load balancers may sanitize input and may remove
headers that are not RFC 2616 complaint. This allows several
tests to be skipped if you are putting one of these products
in front of an S3 compatible API.
2012-07-03 16:28:59 -07:00
Yehuda Sadeh
3eaa877022 annotate tests with fails_on_dho
Should be reverted once fixes are pushed to the dho branch.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-14 18:58:17 -07:00
Yehuda Sadeh
304e3422e2 test two cases in copying object to itself
- should fail when not trying to change metadata
 - should succeed when changing metadata; also verify metadata

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-06-14 17:07:46 -07:00
Yehuda Sadeh
d346415f79 realistic.py: update seek() implementation
seek() requires whence param. Missing it broke readwrite test with
boto 2.4.0.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-05-16 16:35:13 -07:00
Yehuda Sadeh
f1f86a0de0 test_s3: key.set_contents_from_file() rewind on dual write
This fixes a failure with boto 2.4.0.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-05-16 13:32:33 -07:00
Yehuda Sadeh
adabd0ba7d test_s3: fix FakeFile.seek(): handles whence param
beforehand we didn't accept the seek() whence param, which
failed with boto 2.4.0.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-05-16 13:32:20 -07:00
Yehuda Sadeh
ebbafdb3e8 add functional tests for bucket HEAD
Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-19 13:33:08 -07:00
Yehuda Sadeh
1551c5b087 functional: test that bucket recreation doesn't override index
This resolves issue #1853.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
2012-04-02 14:38:39 -07:00
Yehuda Sadeh
4633fe4c12 fix atomic_write test, don't resuse same key handle for read and write 2012-02-15 12:45:31 -08:00
Yehuda Sadeh
256577fc87 set fails_on_dho on test_bucket_create_special_key_names 2012-02-10 21:19:23 -08:00
Yehuda Sadeh
54d98ff1e3 test '%' as a valid char for object name 2012-02-10 16:53:06 -08:00
Yehuda Sadeh
d196c6829d add test_bucket_create_special_key_names 2012-02-06 17:04:24 -08:00
Yehuda Sadeh
c509158413 add test_object_copy_zero_size 2012-02-06 16:38:42 -08:00
Steven Berler
e9492927ae precompute files in readwrite tool
Makes the readwrite tool precompute a set of files and reuse them
when writing objects rather than generating each file on the fly.
2011-12-30 19:05:12 +00:00
Mark Kampe
a268bcfbef RGW test-case annotation for inventory.
Annotated S3 functional and error-detection test cases
with resource/method/operation/assertion properties to
enable automatic test case inventory generation.

Signed-off-by: Mark Kampe <mark.kampe@dreamhost.com>
2011-12-22 16:09:21 -08:00
Mark Kampe
d69a33cc35 Added descriptions of what the fuzzer is and does.
Signed-off-by: Mark Kampe <mark.kampe@dreamhost.com>
2011-12-22 16:09:21 -08:00
Steven Berler
a6227f8acc improve random file generation performance
Makes the random file generator not generate more data
than the size of the file.  Previously it would generate
1 MB of data even if the file was much smaller.
2011-12-22 23:21:58 +00:00
Steven Berler
aaf4219d8d readwrite analysis tool
Adds a tool to analyze the output from the readwrite and roundtrip tools.
The output format is similar to the output from siege.
2011-12-20 00:06:17 +00:00
Yehuda Sadeh
f7dde840a3 test_bucket_create_bad_contentlength_empty should use its own connection
since it can leave the connection in a wierd state
2011-11-22 14:46:53 -08:00
Yehuda Sadeh
a030d88e58 add bucket header tests 2011-11-22 13:25:42 -08:00
Matthew Wodrich
c749ff5043 Mark tests that fail with subdomain calling format
Add @attr('fails_with_subdomain') on all tests that should fail when
subdomain calling format is used, because they break DNS rules.
2011-11-04 16:29:54 -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
Stephon Striplin
dec5360c92 add fails_on_dho on a failing test
It turns out that the e-mail comments were legitimate. The reason the
tests were passing was because the specific users now had e-mail
addresses, but this not the default case.
2011-10-28 12:47:25 -07:00
Kyle Marsh
44bad4c4cc Update docstring for generate_objects 2011-10-19 14:46:22 -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
27d2e40b7d Move fuzzer under s3tests/fuzz.
This way, its unit tests are separate from s3tests/functional,
and s3tests/functional is the thing that actually talks to an
S3 implementation over the wire.

To actually run the fuzzer, use ./virtualenv/bin/s3tests-fuzz-headers
2011-10-13 13:34:23 -07:00
Tommi Virtanen
a18eee85fe Merge remote branch 'github/fuzz_headers' 2011-10-12 15:47:28 -07:00
Stephon Striplin
83755e2782 remove fails_on_{dho,rgw} on passing tests 2011-10-07 12:30:15 -07:00
Sage Weil
e486100a60 add s3tests.functional.test_s3.test_bucket_list_distinct 2011-10-05 16:04:20 -07:00
Sage Weil
211df8dc22 add fails_on_dho to test_object_create_bad_authorization_unreadable 2011-09-26 13:37:16 -07:00
Stephon Striplin
2fcdc79299 add fail_on_rgw on test_object_create_bad_authorization_unreadable 2011-09-23 15:14:26 -07:00
Stephon Striplin
377e968120 Rename object acl test 2011-09-22 13:07:02 -07:00
Stephon Striplin
dc732021d6 add no Content-Length PUT object acl test 2011-09-22 12:50:13 -07:00
Kyle Marsh
046b92b7eb S3 Fuzzer: httplib error handling
Sometimes httplib will through a BadStatusLine error that the fuzzer should
catch and register as a failure.
2011-09-12 13:05:29 -07:00
Kyle Marsh
ab8235b40c S3 Fuzzer: changed output and failure catching. 2011-09-12 13:04:23 -07:00
Kyle Marsh
18c3fe53c2 S3 Fuzzer: Output and garbage data tweaks.
- Output tweaks
- added support for printable_no_whitespace and binary_no_whitespace
2011-09-12 13:03:55 -07:00
Kyle Marsh
f45d28765d S3 Fuzzer: remove num-retries override
Overriding num-retries to 0 sometimes causes boto to fail when the server
doesn't respond fast enough.  Removing the override shouldn't cause any
problems with the fuzzer.
2011-09-12 13:02:27 -07:00
Kyle Marsh
d2c841d1df S3 Fuzzer: PRNG Seed and decisiong graph fixes
- Change random seed generator to always spit out ints between 0 and 100,000
- Fix seeds so randomly generated seeds are *actually* the same as those seeds
	read from a file.
- Tweaks to decision graph

Remaining Bugs:
	- Single } encountered in format string
	- _mexe complains about "BadStatusLine"
2011-09-12 13:01:50 -07:00
Kyle Marsh
23fee1476a S3 Fuzzer: Start Fuzzing
- tweak yaml decision graph
- add test setup bucket creation, etc.
- add output with varying levels of verbosity
2011-09-12 13:01:07 -07:00
Kyle Marsh
76956d86e4 S3 Fuzzer: finish describing bucket operations
Finishing touches on decision graph for bucket operations.
2011-09-12 12:59:53 -07:00
Kyle Marsh
e12f124686 S3 Fuzzer: Change how random data works
Remove SpecialVariables dict subclass in favor of RepeatExpandingFormatter
string.Formatter subclass.
2011-09-12 12:58:57 -07:00
Kyle Marsh
14288ad2f6 S3 Fuzzer: Incorporate Tv's suggestions
Tv looked over the fuzzer and had some idiomatic and design suggestions.

Adds several tests and reworks how expansion happens in addition to idiom
changes.
2011-09-12 12:57:43 -07:00
Kyle Marsh
bb7111a0d1 S3 Fuzzer: Write Decision Graph
Start writing the decision graph describing the fuzzer's attack surface in
earnest.
2011-09-12 12:55:32 -07:00
Kyle Marsh
62bd05a390 S3 Fuzzer: Handle null choices
Sometimes you might want to have your current node terminate the descent or
set something to the empty string.
2011-09-12 12:53:18 -07:00
Kyle Marsh
d7b49713f7 S3 Fuzzer: Implmented headers and made random safe
Random can sometimes include } or { which will confuse the string formatter.
Formatter escapes those values when they're doubled: }}, {{ but this
required some slight hacking to the expander.
2011-09-12 12:53:18 -07:00
Kyle Marsh
3f1314f7c8 S3 Fuzzer: set values can be weighted lists now 2011-09-12 12:53:18 -07:00
Kyle Marsh
4737652fc1 S3 Fuzzer: Added binary mode to random data generator 2011-09-12 12:53:18 -07:00
Kyle Marsh
195571b555 S3 Fuzzer: support weights for choices 2011-09-12 12:53:18 -07:00
Kyle Marsh
f5bb3f9c15 S3 Fuzzer: implemented decision expansion
Decision reached by descending the graph describing the attack surface can
be expanded to fill in all the placeholders
2011-09-12 12:53:17 -07:00
Kyle Marsh
7d9ec02686 S3 Fuzzer: Added SpecialVariables dict subclass
Helper class to catch sentinal keys and turn them into random values.  This
will be used to generate garbage data when expanding a decision.

Also add unit tests for expand_decision and assemble_decision
2011-09-12 12:52:37 -07:00
Kyle Marsh
a9a41a2891 S3 Fuzzer: began writing graph descent
still missing headers and choice weights
2011-09-12 12:52:37 -07:00
Kyle Marsh
fc93c02963 S3 Fuzzer: Change direction towards decision tree
Fuzzer now builds requests based on a DAG that describes the request space
and attack surface.
2011-09-12 12:51:01 -07:00
Kyle Marsh
691955935d S3 Fuzzer: add authorization to FuzzyRequest 2011-09-12 12:50:43 -07:00
Kyle Marsh
31adf6afa5 S3 Fuzzer: Begin writing unit tests for S3 Fuzzer 2011-09-12 12:50:14 -07:00
Kyle Marsh
93cf99aed9 S3 Fuzzer: Add skeleton for a targeted S3 Fuzzer 2011-09-12 12:49:12 -07:00
Stephon Striplin
2efa622751 Add atomic read tests 2011-08-29 13:14:18 -07:00
Stephon Striplin
f232f43d0b update attr decorators for dho
* passes test_object_raw_put_authenticated
* fails test_atomic_write_bucket_gone
2011-08-29 12:47:17 -07:00
Stephon Striplin
eeaeec573b don't delete key in atomic gone test
The key hasn't been written to the server so it doesn't need a delete
2011-08-29 12:36:00 -07:00
Stephon Striplin
3d775a02f4 add raw PUT tests 2011-08-26 13:45:37 -07:00
Stephon Striplin
76f78c0bb8 refactor raw GET tests
urllib2 is no longer necessary. We will use urlparse instead to get the
path and query components of the uri.
2011-08-26 13:42:31 -07:00
Stephon Striplin
e4d78eccbb add test for missing Content-Length header bucket creation 2011-08-25 17:46:25 -07:00
Stephon Striplin
aa700f1c8a add an atomic put test for removing bucket 2011-08-25 17:20:11 -07:00
Stephon Striplin
18d0b7d250 Add raw GET tests 2011-08-25 11:39:50 -07:00
Stephon Striplin
ea3f73ef90 add bucket list data vs object data comparison tests
* test_bucket_list_return_data
* test_bucket_list_object_time
2011-08-11 15:58:26 -07:00
Stephon Striplin
fd68aa2b5b remove superfluous code in test_bucket_list_maxkeys_zero 2011-08-11 15:52:16 -07:00
Stephon Striplin
16d84101e4 remove fails_on_dho on passing tests
* test_object_set_get_metadata_empty_to_unreadable_prefix
* test_object_set_get_metadata_empty_to_unreadable_suffix
* test_object_set_get_metadata_empty_to_unreadable_infix
* test_object_set_get_metadata_overwrite_to_unreadable_prefix
* test_object_set_get_metadata_overwrite_to_unreadable_suffix
* test_object_set_get_metadata_overwrite_to_unreadable_infix
2011-08-11 13:42:10 -07:00
Stephon Striplin
5e7792e0bf Switch test_bucket_list_maxkeys_unreadble to use '\n' instead of '\a'.
This avoids the SAX parser error. It also gave a different error code
from Amazon.
2011-08-11 11:23:43 -07:00
Stephon Striplin
80d332346f Switch tests using '\a' to '\n'
As noted in ce3d448d64, This will avoid
SAX parser errors.
2011-08-11 11:21:17 -07:00
Stephon Striplin
adcfe6f681 remove contentlength zero header test
This test effectively tells the server that this request will contain no
data and any data in the body should be interpreted to be part of the
next request. By luck, we close the tcp connection beforehand so we
don't see this additional data. However, the issues caused here would
not be at the rgw/dho level.
2011-08-11 11:01:56 -07:00
Tommi Virtanen
230ec11852 Flag test_object_create_bad_contenttype_unreadable as failing on both RGW and DHO. 2011-08-11 09:35:06 -07:00
Tommi Virtanen
76faa58bf7 DHO does not support bucket logging currently. 2011-08-11 09:31:20 -07:00
Tommi Virtanen
ce3d448d64 Switch test_object_create_unreadable to use '\n' instead of '\a'.
This avoids a SAX/boto interaction bug that is not of much interest,
yet still seems "evil" enough that it fulfills the original intent
of the test.

Add a link to the relevant bug report.
2011-08-11 09:30:26 -07:00
Tommi Virtanen
48e078a758 Flag test_bucket_list_maxkeys_unreadable as failing on dho & rgw. 2011-08-11 09:28:48 -07:00
Tommi Virtanen
6577c8266c Flag some fails_on_dho tests as fails_on_rgw too. 2011-08-11 08:47:25 -07:00
Tommi Virtanen
7da111aa7e Test that S3 object write replaces the metadata.
See http://tracker.newdream.net/issues/1352
2011-08-10 15:04:19 -07:00
Tommi Virtanen
199b8b46c5 Test S3 api for handling of Content-MD5 that does not match.
The existing test_object_create_bad_md5_invalid is not valid
base64, and hence triggers a different code path. This time,
submit valid base64, but have the result not match the expected
md5sum.
2011-08-10 14:55:34 -07:00
Stephon Striplin
0e9935a01e refactor/add additional prefix/delimiter bucket list tests 2011-08-10 12:05:28 -07:00
Stephon Striplin
f855beff73 add marker bucket list tests 2011-08-09 18:42:06 -07:00
Stephon Striplin
1f2810557f add maxkeys bucket list tests 2011-08-09 18:35:18 -07:00
Stephon Striplin
e7f66f178e add test for no bucket list delimiter 2011-08-09 15:02:54 -07:00
Stephon Striplin
881c09f626 add test for checking bucket list with no prefix 2011-08-08 17:39:02 -07:00
Stephon Striplin
0e698734b6 add non-existant prefix bucket list test 2011-08-08 17:24:40 -07:00
Stephon Striplin
c89404ba68 remove fails_on_dho/rgw on test_bucket_list_many 2011-08-08 16:40:14 -07:00
Stephon Striplin
854dcc5b10 create additional parameterized bucket list tests
* Test on prefix and delimiter, including slash and non-slash
  delimiters.
2011-08-08 15:16:15 -07:00
Stephon Striplin
a1102aaaad add Authorization header tests 2011-07-28 16:46:53 -07:00
Stephon Striplin
1dedf26b95 refactor header update logic 2011-07-28 11:34:52 -07:00
Tommi Virtanen
82a645c625 Demonstrate rgw bucket listing bug.
Discovered by stumbling on the "deleted_cnt" workaround
in s3tests.common.

TODO: Add tests for rest of the functionality in
http://docs.amazonwebservices.com/AmazonS3/latest/API/index.html?RESTBucketGET.html
2011-07-28 11:00:47 -07:00
Tommi Virtanen
a9c47e4951 RandomContentFile.start_time is never used, remove. 2011-07-28 10:20:47 -07:00
Stephon Striplin
832b297cec support multiple boto versions for header writing
Depending on the version of boto, different methods are necessary for
manipulating headers. We now support 2.0rc1 and 2.0 by sub-classing
boto.s3.connection.S3Connection and overloading
boto.connection.HTTPRequest.authorize, respectfully.
2011-07-27 20:04:33 -07:00
Kyle Marsh
68c8f4b87c s3-tests: Object download response code test
If a client specifies a range when requesting an object the server should
respond with 206 Partial Content when answering a request to get an object,
not 200 OK.  It should also respond with only those bytes requested.

This commit introduces a test, test_ranged_request_response_code, that
checks those criteria.
2011-07-27 15:01:13 -07:00
Stephon Striplin
ade49565db change utf8 -> unreadable on header tests 2011-07-27 11:49:18 -07:00
Tommi Virtanen
561dbe8f0b Measure and record duration of write and read stages in roundtrip test. 2011-07-27 11:33:15 -07:00
Stephon Striplin
3b15fc7547 add Date header tests 2011-07-27 10:31:00 -07:00
Stephon Striplin
28c4b432c4 add a Content-Type header test 2011-07-27 10:30:24 -07:00
Stephon Striplin
ab7b4eb03d update Content-Length header tests
* Add more tests
* Add nose.with_setup on some tests
2011-07-27 10:30:00 -07:00
Stephon Striplin
73a2f8fd7f add another Expect header test 2011-07-27 10:29:37 -07:00
Stephon Striplin
2b63bfc18d update MD5 header tests
* Rename a test
* Add more tests
2011-07-27 10:29:06 -07:00
Stephon Striplin
405f33e10c add User-Agent header tests 2011-07-27 10:28:03 -07:00
Stephon Striplin
82ac4f0138 subclass S3Connection class for headers
This makes it possible to overwrite all headers
2011-07-27 10:27:45 -07:00
Tommi Virtanen
7f4fcecaef Remove dead code. 2011-07-26 16:29:16 -07:00
Tommi Virtanen
8a43540eea Convert s3tests.common back to a module.
Code in __init__.py is evil.
2011-07-26 16:26:51 -07:00
Tommi Virtanen
3f49775ce3 Remove dead code. 2011-07-26 16:26:09 -07:00
Tommi Virtanen
700dd3f880 Rewrite roundtrip test based on the readwrite one.
They probably should share more code in the future, but it's only
200 lines of python, so I'm not all that worried.
2011-07-26 16:22:40 -07:00
Tommi Virtanen
f3718da14c Let config file control random number generator seeds in detail. 2011-07-26 15:17:35 -07:00
Tommi Virtanen
7debb53e77 No shebang lines for setup.py-managed scripts. 2011-07-26 14:26:28 -07:00
Tommi Virtanen
513d5fabf2 Make readwrite test not use unittest setup/teardown logic. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
f58641d0bf Refactor bucket nuking in cleanup. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
f30f9d0aca Refactor S3 connection opening. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
367fd3981a Refactor config file reading. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
7a98a496e4 Rename rand_readwrite to readwrite.
Simpler, and all the benchmarks are pretty much as pseudorandom,
in the end; that's not a relevant characteristic. The mix of read
and write operations is.

Re-run ./bootstrap to get the s3tests-test-readwrite script
regenerated to refer to the new module name.
2011-07-26 14:20:28 -07:00
Tommi Virtanen
e17c56a714 Say ".yaml" not ".yml". This is not MS-DOS, and YML is a Yahoo XML dialect. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
3eb53db2b3 Don't bother with fractional nanoseconds.
<1 nanosecond is well below the threshold we can measure,
everything becomes simpler with integers, and they're easier
to skim.
2011-07-26 14:20:28 -07:00
Tommi Virtanen
f21b410154 Use a constant for nanoseconds-in-a-second.
State it in terms of 1e9 (as int not float). My eyes get
blurry from that many zeros.
2011-07-26 14:20:28 -07:00
Tommi Virtanen
37950ac5f2 Remove unused import. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
1993c33ee3 Avoid built-in "file" as variable name. 2011-07-26 14:20:28 -07:00
Tommi Virtanen
3b204bfbdc Revert "adding max_amount to realistic.names generator"
This is now unused code.

This reverts commit 52ba1d4fbf9b3547f8fd27199cf2c4f2c59dbd45.
2011-07-26 14:20:28 -07:00
Tommi Virtanen
91e3918ef5 Use itertools.islice instead of special-casing generator slicing. 2011-07-26 14:20:28 -07:00
Steven Berler
55a72f002b moved most readwrite tool command-line opts to config file
The only remaining command-line options are setting the random seed
and --no-cleanup.
2011-07-26 14:20:28 -07:00
Steven Berler
a6c16990df remove extraneous #TODO 2011-07-26 14:20:28 -07:00
Steven Berler
0c0c590d47 use stderr for non-yml output in readwrite tool
stdout should now only contain the yml output.
2011-07-26 14:20:28 -07:00
Steven Berler
33876b0dae fix yml format in readwrite tool
Now will print the chunks out one line per chunk instead of splitting
them accross multiple lines.
2011-07-26 14:20:28 -07:00
Steven Berler
1e991bc4bc adding chunks to readwrite tool output 2011-07-26 14:20:28 -07:00
Steven Berler
8cf9c57012 fix readwrite tool file sizes
Makes the file sizes specified correctly in KB instead of B
2011-07-26 14:20:28 -07:00
Steven Berler
15cf598b12 readwrite tool improvements
Now generates a list of filenames to use duing the setup, and passes this
list to the workers rather than having the workers list the bucket contents
or generate file names themselves.

Added a "warmup" stage that first writes out all the files so that content
exists for each filename.

Added setting the random seed as a command line parameter and uses this seed
for both generating the file names and the file content generator.
2011-07-26 14:20:28 -07:00
Steven Berler
b465596063 adding max_amount to realistic.names generator
Set max_amount to limit the number of names yeilded by the generator.
2011-07-26 14:20:28 -07:00
Stephon Striplin
a775f5da04 add Content-Type object tests 2011-07-25 14:12:50 -07:00
Stephon Striplin
2e351e9eb8 add header-manipulation tests
These tests are based on explicitly modifying headers in some way.
2011-07-25 11:25:39 -07:00
Stephon Striplin
ee28900620 add test_object_create_unreadable 2011-07-25 11:25:39 -07:00
Yehuda Sadeh
9b3cdf753f test consistency of bucket acls, exercises cache 2011-07-21 14:10:05 -07:00
Stephon Striplin
338728ecd2 add test_bucket_acl_no_grants
When the owner has no grants on their bucket, they should not be able to
write to it, but still read and write the ACL. Amazon allows users to
read the bucket, and our behavior is consistent with this.
2011-07-20 12:30:23 -07:00
Tommi Virtanen
b54e1cbe99 Handle and report errors in readwrite test workers. 2011-07-20 11:32:52 -07:00
Tommi Virtanen
f3b5ed6ccc Say "worker_id" instead of name, as I keep confusing it with filenames. 2011-07-20 11:15:06 -07:00
Tommi Virtanen
1eb38e09e4 Link worker greenlets to parent, so we abort if they have an unhandled exception. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
9ecaf63fbe Code layout cleanup. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
deb8be9957 Make readwrite test put objects one by one, so it can report keys. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
9e707b897d Remove the concept of batches from readwrite test.
That's an internal implementation detail caused by
the generate_objects api.
2011-07-20 11:06:30 -07:00
Tommi Virtanen
4cd4131dd7 Don't eat exceptions, that's a bad habit. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
648ddbb761 Log readwrite test results in yaml.
This temporarily removes the statistics calculation; that
belongs somewhere else anyway, so it can be run on aggregated
results etc.
2011-07-20 11:06:30 -07:00
Tommi Virtanen
ed966af0a7 Use more idiomatic Python. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
ad444b33ee Make queue and name arguments not optional; they're always passed in anyway. 2011-07-20 11:06:30 -07:00
Tommi Virtanen
71cfd4956c Move end test logic out of individual workers.
Parent waits for the duration anyway, just make it unconditionally
kill the workers. They already had timeouts aborting them; they may
be in the middle of an operation, but we really don't care, time's up.

This also avoids oddities with the queue where there may be items
after the StopIteration.

This also avoids workers potentially not exiting within the 1-second
timeout the old code had.
2011-07-20 11:06:30 -07:00
Tommi Virtanen
dff6b568e4 Use gevent Groups to manage groups of workers.
This mostly adds convenience functions, but it's nice to have.
2011-07-20 11:06:30 -07:00
Stephon Striplin
510b6e91d4 refactor and fix some acl_grant tests 2011-07-19 11:16:11 -07:00
Tommi Virtanen
fe749adebf pep8 cleanup. 2011-07-19 09:09:51 -07:00
Tommi Virtanen
e0575e4efe Pyflakes cleanup. 2011-07-19 09:05:05 -07:00
Tommi Virtanen
c7bb78b666 Remove dead code. 2011-07-19 09:04:20 -07:00
Tommi Virtanen
5c25c66649 Merge branch 'roundtrip' 2011-07-19 09:00:44 -07:00
Tommi Virtanen
56ff0f6374 Revert "Add assert to RandomContentFile, ensure size >= digest_size"
This reverts commit fb8f110e69.

realistic.files was meant to work just fine with short files. Commit
91c4f88860 has a fix for the verifying
side, to support short files.

Conflicts:

	s3tests/realistic.py
2011-07-19 08:56:17 -07:00
Wesley Spikes
0297d61e40 Swap stdout/stderr -- debug messages then go to stderr, and yaml data to stdout 2011-07-18 17:04:36 -07:00
Wesley Spikes
ce6c57841a Now that we no longer have the need to retry, get rid of that logic.
Also fix a typo -- s/neads_first_read/needs_first_read/
2011-07-18 16:15:40 -07:00
Wesley Spikes
c154d98b96 Resolve the random AssertionError
By doing a copy-new on the key, it seems to work around the random
AssertionError's I've been seeing. Here's hoping this fully
resolves it.
2011-07-18 16:15:40 -07:00
Wesley Spikes
44cb2f256e Adding unlimited=bool to files_varied -- if set to true, it will never issue StopIteration 2011-07-18 16:15:40 -07:00
Wesley Spikes
43b2f8695d Cleanup output just a little bit more. 2011-07-18 16:15:40 -07:00
Wesley Spikes
841b098619 Refactor/cleanup TransferResults class. Also cleans the output to be in the format TV seems to want. 2011-07-18 16:15:40 -07:00
Wesley Spikes
3c07a4a363 Update roundtrip._main -- while loop should auto-replenish all pools,
and not ones so named.
2011-07-18 16:15:40 -07:00
Wesley Spikes
fb8f110e69 Add assert to RandomContentFile, ensure size >= digest_size
It clearly will not work to have the size smaller than the digest
size, so we shouldn't allow it.
2011-07-18 16:15:40 -07:00
Wesley Spikes
d0bb148dea Rename _call_doit to _real_run -- it's a bit more clear that way, IMHO 2011-07-18 16:15:40 -07:00
Stephon Striplin
5136608e76 fix test_bucket_acl_grant_nonexist_user
* Change user_id to avoid name conflict
* Check for error_code
2011-07-15 14:57:46 -07:00
Stephon Striplin
03a80e6121 add acl grant userid tests
* Refactor some acl grant user_id code and run through the full suite of
  acls
2011-07-15 14:34:08 -07:00
Wesley Spikes
653c2b2200 Adding new testing tool, roundtrip 2011-07-15 12:06:02 -07:00
Wesley Spikes
6afc7fdcdb Adding last_read to RandomContentFile and first_write to FileVerifier, so we can measure latency. 2011-07-15 12:05:02 -07:00
Wesley Spikes
12716d854b Adding generator files_varied to s3tests.realistic
Given a tuple of tuples, construct several files() generators, and
yield from those randomly. Randomness is weighted based on the number
of files remaining in each group.
2011-07-15 12:03:23 -07:00
Wesley Spikes
4959c5e1a4 Work-around for RGW failing to send IsTruncated on listing all keys.
Without this, it fails to delete the bucket when there's more than 1000 keys.
2011-07-15 11:47:57 -07:00
Wesley Spikes
b6e0287810 Add context, get_next_key, and fill_pools to s3tests.common
context is a generic Bunch that we can store items in to be shared
across modules, without invoking the wrath of the globals -- yuck!

get_next_key will generate a sequentially numbered key for us to use

fill_pools will take a variable list of gevent.pool.Pool objects and
top them all off
2011-07-15 11:45:38 -07:00
Wesley Spikes
298bc99c5d Packagify s3tests.common so we can add more magic into it later. 2011-07-15 11:44:05 -07:00
Wesley Spikes
e4effe5479 realistic.names shouldn't return a 0-length filename 2011-07-15 11:08:38 -07:00
Yehuda Sadeh
3303b0f33b fix 100-continue test to support https 2011-07-14 16:26:46 -07:00
Steven Berler
c312832c70 use time.time() instead of time.clock()
We want to measure actual time, not cpu time.
2011-07-14 11:40:26 -07:00
Kyle Marsh
3d13883f62 dhq-qa: remove query auth from generated urls
Object generation for static load testing now sets the ACL on the test
bucket and keys to 'public-read' so we don't need an expiring, temp url.
2011-07-14 11:37:54 -07:00
Steven Berler
7b51f55a1b fix zero devision error in readwrite test
Was dividing by 0 if somehow it managed to upload or download a file
in under .01 seconds.
2011-07-14 11:00:48 -07:00
Steven Berler
91c4f88860 fix random file verifier with small files
The file verifier will now correctly verify small files (smaller than
the md5 digest size), as long as the data that is there matches what
the digest would be.
2011-07-13 15:59:38 -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
02a4c82dfa Make generate_objects.py and rand_readwrite.py inside the package.
Handle dependencies properly. Now e.g. "./bootstrap &&
./virtualenv/bin/s3tests-test-readwrite" should just work.
2011-07-13 13:52:54 -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