Commit graph

482 commits

Author SHA1 Message Date
Abhishek Lekshmanan
1012710ce7 policy: test for acl grants conditionals on put bucket acls
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:56:32 +01:00
Abhishek Lekshmanan
006f9d5f46 policy: add tests for put bucket acl with canned acl conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:56:31 +01:00
Abhishek Lekshmanan
b1e1ba0edf s3: policy tests for ListBucket with prefix, delimiter & max-keys
Allow conditionals on ListBucket similar to s3 docs which allow for
these clauses

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:56:31 +01:00
Abhishek Lekshmanan
3e650c5e6e policy: test put object tagging with conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:56:31 +01:00
Abhishek Lekshmanan
3511eabc5c policy: test get object tagging with conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:56:26 +01:00
Abhishek Lekshmanan
5167af2e73 add policy tests for get object with conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:55:02 +01:00
Abhishek Lekshmanan
5ae2337747 add bucket-policy attr to all the policy tests
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:52:49 +01:00
Abhishek Lekshmanan
fe35325ab8 test_s3: modify make_json_policy to support conditionals
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:52:49 +01:00
Abhishek Lekshmanan
eee2d9a82c bucket policy: improve the helper functions used for tagging upwards
- Improve `make_json_policy` to support conditionals in policy
- Move the helper functions for creating policies up so that bucket
  policy tests can use these
- add bucket-policy attribute to the tagging tests using policy

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2018-01-17 10:52:49 +01:00
Matt Benjamin
f5ad2bfaee Add test case for POST with no Content-Type header
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
2017-12-20 16:55:39 -05:00
Xinying Song
9506ac220f Add test case for getting version-id when upload objects to bucket
For default-bucket and versioning-suspended-bucket, no version-id should return when upload.
For versioning-enabled-bucket, an non-empty version-id should return and equal to what
bucket list shows.

Signed-off-by: Xinying Song <songxinying@cloudin.cn>
2017-11-22 09:26:13 +08:00
Casey Bodley
92c4ac5a59
Merge pull request #196 from ZVampirEM77/wip-lc-typos
Fix a typos for lifecycle test case

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-11-09 09:02:57 -05:00
Enming Zhang
52d9c955df cleanup unneeded comments
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
2017-11-07 21:23:04 +08:00
Enming Zhang
19176daaf9 Fix a typos for lifecycle test case
According to the commit 9204283def,
lc debug interval should be set to 10s.

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
2017-11-07 21:23:04 +08:00
Vasu Kulkarni
e208a74a05 check for either 400 or 416 response code for invalid range test
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2017-11-06 11:35:32 -08:00
Yehuda Sadeh
5138dd451d Merge pull request #189 from joke-lee/list_bucket_versiong_with_marker
test for https://github.com/ceph/ceph/pull/17934

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-10-26 09:40:40 -07:00
Casey Bodley
42debb8be7 expect 400 for missing sse headers
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-10-10 13:49:37 -04:00
Yehuda Sadeh
a2a383e77f Merge pull request #171 from cbodley/wip-amz-date-precedence
check precedence of Date and X-Amz-Date in signatures

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-09-25 19:15:07 +03:00
yuliyang
f464a5a3b1 test for https://github.com/ceph/ceph/pull/17934
Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
2017-09-24 11:56:36 +08:00
Yehuda Sadeh
0826df92d2 Merge pull request #186 from tipabu/check-grant-ordering
Care less about ordering when checking grants

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-09-20 11:55:52 +03:00
Yehuda Sadeh
94d5be6ace Merge pull request #185 from theanalyst/lc-time-fixes
lc: Give more flexibility for LC expiration times

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-09-19 12:57:33 +03:00
Tim Burke
301272c0ef Care less about ordering when checking grants
Some tests, like test_object_header_acl_grants and
test_bucket_header_acl_grants, use the same id for all permissions.
Sort() is stable, so those tests end up testing the order of acl grants
returned by Boto. Not sure, but I think this may in turn depend on the
order of HTTP headers, where the order is not significant.

Signed-off-by: Tim Burke <tim.burke@gmail.com>
2017-09-12 13:24:00 -06:00
Abhishek Lekshmanan
9204283def lc: Give more flexibility for LC expiration times
Earlier values expected a lc debug interval of 2s, which is a pretty
short time window and can often lead to failures if the processing
didn't complete within the next day. This commit assumes the currently
configured LC debug interval of 10s, and gives time intervals using the
following logic:

Worst case:
LC start-time : 00:00
obj upload    : 00:01
LC run1       : 00:10 -> object not expired as it is only 9s old
LC run2       : 00:20 -> object will expire in this run, however we
can't exactly guess when this run will complete, for a moderate amount
of objects this can take anywhere between 1 to a max of 10s, let us give
it a wiggle room to complete around 8s, given the amount of objects in a
teuthology run, it should be mostly probable that the object is already
deleted within this time, so at 28s, we should have seen day1 objects being
expired.

Best case:
LC start-time: 00:00
obj upload : 00:09
LC run1 : 00:10
LC run2 : 00:20 -> obj expires, so elapsed time is around 11->19s (of
course it would almost close to 10s too), We should probably configure
the LC lock time to 10s as well just so as to ensure that the lock isn't
held for the default 60s in which case it is possible that the object
might expire in a time greater than the lock interval.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-09-07 11:50:00 +02:00
hechuang
1ca6a94e6a modify test_sse_kms_method_head() for aws standard
Signed-off-by: hechuang <hechuang@xsky.com>
2017-08-17 12:07:41 +08:00
hechuang
b554973239 add test_sse_kms_read_declare() for aws standard
Signed-off-by: hechuang <hechuang@xsky.com>
2017-08-17 12:07:06 +08:00
hechuang
58944d0ba6 rgw: Data encryption is not follow the AWS agreement
Encryption request headers should not be sent for GET requests and HEAD
requests if your object uses SSE-KMS/SSE-S3 or you’ll get an HTTP 400
BadRequest error.

Signed-off-by: hechuang <hechuang@xsky.com>
2017-08-17 12:04:53 +08:00
Yehuda Sadeh
425d209989 Merge pull request #179 from andrewgaul/copy-part-invalid-range
Add test for invalid copy part range

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-08-16 09:36:07 -07:00
Yehuda Sadeh
4ff6b044c2 Merge pull request #181 from theanalyst/lc-expir-disable
lc: set attribute as lifecycle_time for lc tests using timing ops

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-08-15 08:43:53 -07:00
Abhishek Lekshmanan
edeb956a82 lc: add attr lifecycle_expiration for lc tests using expiration
Allows us to additionally filter out these tests which currently fail in
the teuthology runs

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-08-15 10:42:00 +02:00
Abhishek Lekshmanan
cc2d6f076f lifecycle: add test cases using filter & no id
Added test cases for LC policies with no ID in xml, no prefix and an
empty and non empty Filter.

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-08-11 13:52:21 +02:00
Andrew Gaul
b068a07301 Add test for invalid copy part range
References kahing/goofys#212.

Signed-off-by: Andrew Gaul <andrew@gaul.org>
2017-08-01 19:03:31 -07:00
Abhishek Lekshmanan
6086420b4b add tests for get/put/delete/post object tagging
- adds test for put obj with tagging query
- adds test for HEAD obj with x-amz-tagging-count verification
- adds test for put object tagging
- adds test for get object tagging
- adds test for post object tagging
- adds test for delete object tagging
- also verify& exceed the max tags
- add tagging condition to bucket acl

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-07-25 10:51:29 +02:00
yuliyang
d0dfee8ef1 add test case: test set policy with condition operator end with IfExists
Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
2017-07-08 07:27:04 +08:00
Yehuda Sadeh
0b45914f40 Merge pull request #174 from ceph/wip-underscore-prefix
Add test for bucket list with prefix with underscore

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-07-07 14:04:43 -07:00
Yehuda Sadeh
a872170316 Merge pull request #170 from zhangsw/lifecycle-date
add test case for lifecycle expiration date.

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2017-07-07 13:59:34 -07:00
Yehuda Sadeh
d801534f99 Merge pull request #168 from zhangsw/lifecycle-expiration
modify the thread sleep time in lifecycle expiration test so that it can pass on ceph master branch.

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2017-07-07 13:58:55 -07:00
Yehuda Sadeh
ed701f0c65 Merge pull request #163 from pritha-srivastava/wip-rgw-bucket-policy-tests
rgw: Adding tests for Bucket Policy.

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2017-07-07 13:56:25 -07:00
Orit Wasserman
1e2e60bd6c Add test for bucket list with prefix with underscore
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
2017-07-06 15:30:52 +03:00
Casey Bodley
a2f73f6a84 check precedence of Date and X-Amz-Date in signatures
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-06-21 10:19:12 -04:00
Zhang Shaowen
bba1b44d7b modify the thread sleep time in lifecycle expiration test so that it can
pass on ceph master branch.

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
2017-06-20 16:32:24 +08:00
Zhang Shaowen
fe7d69cabc add test case for lifecycle expiration date.
Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
2017-06-20 16:07:03 +08:00
Casey Bodley
a358a840b6 clear key.version_id now that GET requests return x-amz-version-id header
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-06-14 13:42:57 -04:00
Pritha Srivastava
cd50db0260 rgw: Adding tests for Bucket Policy.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
2017-06-09 19:58:51 +05:30
Yehuda Sadeh
d91b9c43a5 Merge pull request #157 from zhangsw/verionid-getobjectmeta
Add test case for getting version id when getting object and object's metadata

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-06-06 14:25:10 -07:00
Zhang Shaowen
113e6f9bf6 Test case for non-current expiration, multipart upload expiration and
delete marker expiration.

Fixes: http://tracker.ceph.com/issues/19519

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
2017-05-04 15:57:46 +08:00
Zhang Shaowen
04ecc85d33 Add test case for getting version id when getting object and object's metadata
Fixes: http://tracker.ceph.com/issues/19565

Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
2017-04-10 17:58:26 +08:00
Casey Bodley
e49cf3ddab crypto: add key headers to valid HEAD requests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-03-28 10:03:59 -04:00
Adam Kupczyk
b27ddae9c4 Added tests for HEAD method for encrypted objects.
Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
2017-03-28 10:03:59 -04:00
Adam Kupczyk
05543b85b1 Modified aws kms tests to use config variable kms_keyid
Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
2017-03-28 10:03:59 -04:00
Adam Kupczyk
33deec9a77 A bit more test for kms
Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
2017-03-28 10:03:55 -04:00