@@ -213,6 +213,7 @@ def validate_bucket_list(bucket, prefix, delimiter, marker, max_keys,
213
213
@attr (method = 'get' )
214
214
@attr (operation = 'list' )
215
215
@attr (assertion = 'prefixes in multi-component object names' )
216
+ @attr ('fails_on_rcs' )
216
217
def test_bucket_list_delimiter_prefix ():
217
218
bucket = _create_keys (keys = ['asdf' , 'boo/bar' , 'boo/baz/xyzzy' , 'cquux/thud' , 'cquux/bla' ])
218
219
@@ -994,6 +995,7 @@ def test_object_set_get_unicode_metadata():
994
995
@attr (operation = 'metadata write/re-write' )
995
996
@attr (assertion = 'non-UTF-8 values detected, but preserved' )
996
997
@attr ('fails_strict_rfc2616' )
998
+ @attr ('fails_on_rcs' )
997
999
def test_object_set_get_non_utf8_metadata ():
998
1000
bucket = get_new_bucket ()
999
1001
key = boto .s3 .key .Key (bucket )
@@ -1022,6 +1024,7 @@ def _set_get_metadata_unreadable(metadata, bucket=None):
1022
1024
@attr (operation = 'metadata write' )
1023
1025
@attr (assertion = 'non-priting prefixes noted and preserved' )
1024
1026
@attr ('fails_strict_rfc2616' )
1027
+ @attr ('fails_on_rcs' )
1025
1028
def test_object_set_get_metadata_empty_to_unreadable_prefix ():
1026
1029
metadata = '\x04 w'
1027
1030
got = _set_get_metadata_unreadable (metadata )
@@ -1033,6 +1036,7 @@ def test_object_set_get_metadata_empty_to_unreadable_prefix():
1033
1036
@attr (operation = 'metadata write' )
1034
1037
@attr (assertion = 'non-priting suffixes noted and preserved' )
1035
1038
@attr ('fails_strict_rfc2616' )
1039
+ @attr ('fails_on_rcs' )
1036
1040
def test_object_set_get_metadata_empty_to_unreadable_suffix ():
1037
1041
metadata = 'h\x04 '
1038
1042
got = _set_get_metadata_unreadable (metadata )
@@ -1043,6 +1047,7 @@ def test_object_set_get_metadata_empty_to_unreadable_suffix():
1043
1047
@attr (method = 'put' )
1044
1048
@attr (operation = 'metadata write' )
1045
1049
@attr (assertion = 'non-priting in-fixes noted and preserved' )
1050
+ @attr ('fails_on_rcs' )
1046
1051
def test_object_set_get_metadata_empty_to_unreadable_infix ():
1047
1052
metadata = 'h\x04 w'
1048
1053
got = _set_get_metadata_unreadable (metadata )
@@ -1054,6 +1059,7 @@ def test_object_set_get_metadata_empty_to_unreadable_infix():
1054
1059
@attr (operation = 'metadata re-write' )
1055
1060
@attr (assertion = 'non-priting prefixes noted and preserved' )
1056
1061
@attr ('fails_strict_rfc2616' )
1062
+ @attr ('fails_on_rcs' )
1057
1063
def test_object_set_get_metadata_overwrite_to_unreadable_prefix ():
1058
1064
metadata = '\x04 w'
1059
1065
got = _set_get_metadata_unreadable (metadata )
@@ -1068,6 +1074,7 @@ def test_object_set_get_metadata_overwrite_to_unreadable_prefix():
1068
1074
@attr (operation = 'metadata re-write' )
1069
1075
@attr (assertion = 'non-priting suffixes noted and preserved' )
1070
1076
@attr ('fails_strict_rfc2616' )
1077
+ @attr ('fails_on_rcs' )
1071
1078
def test_object_set_get_metadata_overwrite_to_unreadable_suffix ():
1072
1079
metadata = 'h\x04 '
1073
1080
got = _set_get_metadata_unreadable (metadata )
@@ -1081,6 +1088,7 @@ def test_object_set_get_metadata_overwrite_to_unreadable_suffix():
1081
1088
@attr (method = 'put' )
1082
1089
@attr (operation = 'metadata re-write' )
1083
1090
@attr (assertion = 'non-priting in-fixes noted and preserved' )
1091
+ @attr ('fails_on_rcs' )
1084
1092
def test_object_set_get_metadata_overwrite_to_unreadable_infix ():
1085
1093
metadata = 'h\x04 w'
1086
1094
got = _set_get_metadata_unreadable (metadata )
@@ -2131,7 +2139,7 @@ def test_put_object_ifmatch_good():
2131
2139
got_data = key .get_contents_as_string ()
2132
2140
eq (got_data , 'bar' )
2133
2141
2134
- key .set_contents_from_string ('zar' , headers = {'If-Match' : key .etag .replace ( '"' , '' ). strip ()})
2142
+ key .set_contents_from_string ('zar' , headers = {'If-Match' : key .etag .strip ()})
2135
2143
got_new_data = key .get_contents_as_string ()
2136
2144
eq (got_new_data , 'zar' )
2137
2145
@@ -2223,7 +2231,7 @@ def test_put_object_ifnonmatch_failed():
2223
2231
eq (got_data , 'bar' )
2224
2232
2225
2233
e = assert_raises (boto .exception .S3ResponseError , key .set_contents_from_string , 'zar' ,
2226
- headers = {'If-None-Match' : key .etag .replace ( '"' , '' ). strip ()})
2234
+ headers = {'If-None-Match' : key .etag .strip ()})
2227
2235
eq (e .status , 412 )
2228
2236
eq (e .reason , 'Precondition Failed' )
2229
2237
eq (e .error_code , 'PreconditionFailed' )
@@ -2310,7 +2318,10 @@ def _make_request(method, bucket, key, body=None, authenticated=False, response_
2310
2318
else :
2311
2319
class_ = HTTPConnection
2312
2320
2313
- c = class_ (s3 .main .host , s3 .main .port , strict = True )
2321
+ if s3 .main .proxy is None :
2322
+ c = class_ (s3 .main .host , s3 .main .port , strict = True )
2323
+ else :
2324
+ c = class_ (s3 .main .proxy , s3 .main .proxy_port , strict = True )
2314
2325
c .request (method , path , body = body )
2315
2326
res = c .getresponse ()
2316
2327
@@ -2335,7 +2346,10 @@ def _make_bucket_request(method, bucket, body=None, authenticated=False, expires
2335
2346
else :
2336
2347
class_ = HTTPConnection
2337
2348
2338
- c = class_ (s3 .main .host , s3 .main .port , strict = True )
2349
+ if s3 .main .proxy is None :
2350
+ c = class_ (s3 .main .host , s3 .main .port , strict = True )
2351
+ else :
2352
+ c = class_ (s3 .main .proxy , s3 .main .proxy_port , strict = True )
2339
2353
c .request (method , path , body = body )
2340
2354
res = c .getresponse ()
2341
2355
@@ -2487,6 +2501,7 @@ def test_object_raw_authenticated():
2487
2501
@attr (operation = 'authenticated on private bucket/private object with modified response headers' )
2488
2502
@attr (assertion = 'succeeds' )
2489
2503
@attr ('fails_on_rgw' )
2504
+ @attr ('fails_on_rcs' )
2490
2505
def test_object_raw_response_headers ():
2491
2506
(bucket , key ) = _setup_request ('private' , 'private' )
2492
2507
@@ -2819,6 +2834,7 @@ def test_bucket_create_naming_bad_punctuation():
2819
2834
@attr (method = 'put' )
2820
2835
@attr (operation = 'create w/underscore in name' )
2821
2836
@attr (assertion = 'succeeds' )
2837
+ @attr ('fails_on_rcs' )
2822
2838
def test_bucket_create_naming_dns_underscore ():
2823
2839
check_good_bucket_name ('foo_bar' )
2824
2840
@@ -3377,6 +3393,7 @@ def test_object_acl_canned_bucketownerfullcontrol():
3377
3393
@attr (method = 'put' )
3378
3394
@attr (operation = 'set write-acp' )
3379
3395
@attr (assertion = 'does not modify owner' )
3396
+ @attr ('fails_on_rcs' )
3380
3397
def test_object_acl_full_control_verify_owner ():
3381
3398
bucket = get_new_bucket (targets .main .default )
3382
3399
bucket .set_acl ('public-read-write' )
@@ -3810,6 +3827,7 @@ def _get_acl_header(user=None, perms=None):
3810
3827
@attr (operation = 'add all grants to user through headers' )
3811
3828
@attr (assertion = 'adds all grants individually to second user' )
3812
3829
@attr ('fails_on_dho' )
3830
+ @attr ('fails_on_rcs' )
3813
3831
def test_object_header_acl_grants ():
3814
3832
bucket = get_new_bucket ()
3815
3833
headers = _get_acl_header ()
@@ -3869,6 +3887,7 @@ def test_object_header_acl_grants():
3869
3887
@attr (operation = 'add all grants to user through headers' )
3870
3888
@attr (assertion = 'adds all grants individually to second user' )
3871
3889
@attr ('fails_on_dho' )
3890
+ @attr ('fails_on_rcs' )
3872
3891
def test_bucket_header_acl_grants ():
3873
3892
headers = _get_acl_header ()
3874
3893
bucket = get_new_bucket (targets .main .default , get_prefix (), headers )
@@ -4235,6 +4254,8 @@ def _create_connection_bad_auth(aws_access_key_id='badauth'):
4235
4254
is_secure = main .is_secure ,
4236
4255
port = main .port ,
4237
4256
host = main .host ,
4257
+ proxy = main .proxy ,
4258
+ proxy_port = main .proxy_port ,
4238
4259
calling_format = main .calling_format ,
4239
4260
)
4240
4261
return conn
@@ -4259,6 +4280,7 @@ def test_list_buckets_anonymous():
4259
4280
@attr (method = 'get' )
4260
4281
@attr (operation = 'list all buckets (bad auth)' )
4261
4282
@attr (assertion = 'fails 403' )
4283
+ @attr ('fails_on_rcs' )
4262
4284
def test_list_buckets_invalid_auth ():
4263
4285
conn = _create_connection_bad_auth ()
4264
4286
e = assert_raises (boto .exception .S3ResponseError , conn .get_all_buckets )
@@ -4270,6 +4292,7 @@ def test_list_buckets_invalid_auth():
4270
4292
@attr (method = 'get' )
4271
4293
@attr (operation = 'list all buckets (bad auth)' )
4272
4294
@attr (assertion = 'fails 403' )
4295
+ @attr ('fails_on_rcs' )
4273
4296
def test_list_buckets_bad_auth ():
4274
4297
conn = _create_connection_bad_auth (aws_access_key_id = s3 .main .aws_access_key_id )
4275
4298
e = assert_raises (boto .exception .S3ResponseError , conn .get_all_buckets )
@@ -4393,6 +4416,7 @@ def test_object_copy_same_bucket():
4393
4416
@attr (method = 'put' )
4394
4417
@attr (operation = 'copy object to itself' )
4395
4418
@attr (assertion = 'fails' )
4419
+ @attr ('fails_on_rcs' )
4396
4420
def test_object_copy_to_itself ():
4397
4421
bucket = get_new_bucket ()
4398
4422
key = bucket .new_key ('foo123bar' )
@@ -4572,6 +4596,7 @@ def _multipart_upload(bucket, s3_key_name, size, part_size=5*1024*1024, do_list=
4572
4596
@attr (resource = 'object' )
4573
4597
@attr (method = 'put' )
4574
4598
@attr (operation = 'check multipart upload without parts' )
4599
+ @attr ('fails_on_rcs' )
4575
4600
def test_multipart_upload_empty ():
4576
4601
bucket = get_new_bucket ()
4577
4602
key = "mymultipart"
@@ -4690,6 +4715,7 @@ def test_multipart_upload_multiple_sizes():
4690
4715
@attr (method = 'put' )
4691
4716
@attr (operation = 'check failure on multiple multi-part upload with size too small' )
4692
4717
@attr (assertion = 'fails 400' )
4718
+ @attr ('fails_on_rcs' ) # this is an artifact by enforce_multipart_part_size=false in r_t
4693
4719
def test_multipart_upload_size_too_small ():
4694
4720
bucket = get_new_bucket ()
4695
4721
key = "mymultipart"
@@ -4803,7 +4829,7 @@ def test_list_multipart_upload():
4803
4829
upload2 .cancel_upload ()
4804
4830
upload3 .cancel_upload ()
4805
4831
4806
- def _simple_http_req_100_cont (host , port , is_secure , method , resource ):
4832
+ def _simple_http_req_100_cont (host , port , proxy , proxy_port , is_secure , method , resource ):
4807
4833
"""
4808
4834
Send the specified request w/expect 100-continue
4809
4835
and await confirmation.
@@ -4818,7 +4844,10 @@ def _simple_http_req_100_cont(host, port, is_secure, method, resource):
4818
4844
if is_secure :
4819
4845
s = ssl .wrap_socket (s );
4820
4846
s .settimeout (5 )
4821
- s .connect ((host , port ))
4847
+ if proxy is None :
4848
+ s .connect ((host , port ))
4849
+ else :
4850
+ s .connect ((proxy , proxy_port ))
4822
4851
s .send (req )
4823
4852
4824
4853
try :
@@ -4845,12 +4874,16 @@ def test_100_continue():
4845
4874
objname = 'testobj'
4846
4875
resource = '/{bucket}/{obj}' .format (bucket = bucket .name , obj = objname )
4847
4876
4848
- status = _simple_http_req_100_cont (s3 .main .host , s3 .main .port , s3 .main .is_secure , 'PUT' , resource )
4877
+ status = _simple_http_req_100_cont (s3 .main .host , s3 .main .port ,
4878
+ s3 .main .proxy , s3 .main .proxy_port ,
4879
+ s3 .main .is_secure , 'PUT' , resource )
4849
4880
eq (status , '403' )
4850
4881
4851
4882
bucket .set_acl ('public-read-write' )
4852
4883
4853
- status = _simple_http_req_100_cont (s3 .main .host , s3 .main .port , s3 .main .is_secure , 'PUT' , resource )
4884
+ status = _simple_http_req_100_cont (s3 .main .host , s3 .main .port ,
4885
+ s3 .main .proxy , s3 .main .proxy_port ,
4886
+ s3 .main .is_secure , 'PUT' , resource )
4854
4887
eq (status , '100' )
4855
4888
4856
4889
def _test_bucket_acls_changes_persistent (bucket ):
@@ -4882,6 +4915,7 @@ def test_stress_bucket_acls_changes():
4882
4915
@attr (method = 'put' )
4883
4916
@attr (operation = 'set cors' )
4884
4917
@attr (assertion = 'succeeds' )
4918
+ @attr ('cors' )
4885
4919
def test_set_cors ():
4886
4920
bucket = get_new_bucket ()
4887
4921
cfg = CORSConfiguration ()
@@ -4925,6 +4959,7 @@ def _cors_request_and_check(func, url, headers, expect_status, expect_allow_orig
4925
4959
@attr (method = 'get' )
4926
4960
@attr (operation = 'check cors response when origin header set' )
4927
4961
@attr (assertion = 'returning cors header' )
4962
+ @attr ('cors' )
4928
4963
def test_cors_origin_response ():
4929
4964
cfg = CORSConfiguration ()
4930
4965
bucket = get_new_bucket ()
@@ -5096,6 +5131,8 @@ def _test_atomic_read(file_size):
5096
5131
is_secure = s3 ['main' ].is_secure ,
5097
5132
port = s3 ['main' ].port ,
5098
5133
host = s3 ['main' ].host ,
5134
+ proxy = s3 ['main' ].proxy ,
5135
+ proxy_port = s3 ['main' ].proxy_port ,
5099
5136
calling_format = s3 ['main' ].calling_format ,
5100
5137
)
5101
5138
0 commit comments