
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKrSSKJs  J	r	  SSK
Jr  SSKJr  SS	KJr   " S
 S\	R"                  5      rg)=Integration tests for multiple bucket configuration commands.    )absolute_import)print_function)division)unicode_literalsN)	SkipForS3)ObjectToURI)UTF8c                       \ rS rSrSrSS/rSS/rSrSr\	R                  " \5      rSS/rSS/rS	rS
r\	R                  " \5      rSS/rSS/rSS/rSS/r\" S5      S 5       rSrg)TestBucketConfig   r   corssetgetz[]a  [{"origin": ["http://origin1.example.com", "http://origin2.example.com"], "responseHeader": ["foo", "bar"], "method": ["GET", "PUT", "POST"], "maxAgeSeconds": 3600},{"origin": ["http://origin3.example.com"], "responseHeader": ["foo2", "bar2"], "method": ["GET", "DELETE"]}]
	lifecyclez{}zF{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 365}}]}
acldefaclz8A number of configs in this test are not supported by S3c                    U R                  5       nU R                  U R                  R                  [        5      S9nU R                  U R
                  R                  [        5      S9nU R                  U R                  U[        U5      /-   5        U R                  U R                  [        U5      /-   SS9nU R                  [        R                  " U5      U R                  5        U R                  U R                  U[        U5      /-   5        U R                  U R                  [        U5      /-   SS9nU R                  U R                  [        U5      /-   SS9nU R                  [        R                  " U5      U R                  5        U R                  [        R                  " U5      U R                   5        U R#                  5       (       d)  U R                  U R$                  S[        U5      /-   5        U R                  U R                  [        U5      /-   SS9nU R                  U R                  [        U5      /-   SS9nU R                  [        R                  " U5      U R                  5        U R                  [        R                  " U5      U R                   5        U R#                  5       (       d9  U R                  U R&                  [        U5      /-   SS9nU R)                  SU5        U R                  U R*                  S[        U5      /-   5        U R                  U R                  [        U5      /-   SS9nU R                  U R                  [        U5      /-   SS9nU R                  U R,                  [        U5      /-   SS9nU R                  [        R                  " U5      U R                  5        U R                  [        R                  " U5      U R                   5        U R)                  SU5        U R#                  5       (       d:  U R                  U R&                  [        U5      /-   SS9nU R)                  SU5        gg)	zBTests that bucket config patching affects only the desired config.)contentsT)return_stdoutzauthenticated-readallAuthenticatedUserszpublic-readallUsersN)CreateBucketCreateTempFilelifecycle_docencoder
   cors_doc	RunGsUtil_set_cors_commandsuri_get_cors_commandassertEqualjsonloadscors_json_obj_set_lifecycle_command_get_lifecycle_commandlifecycle_json_obj!_ServiceAccountCredentialsPresent_set_acl_command_get_acl_commandassertIn_set_defacl_command_get_defacl_command)self
bucket_urilifecycle_path	cors_pathcors_outlifecycle_outacl_outdef_acl_outs           0platform/gsutil/gslib/tests/test_bucketconfig.pytest_set_multi_config&TestBucketConfig.test_set_multi_config<   s    ""$J((##**40 ) 2N##T]]-A-A$-G#HINN4))YZ8H,IIJ~~d44Z8H7II,0  2HTZZ)4+=+=>NN4.."D$456 7~~d44Z8H7II,0  2HNN4#>#>$($4#5$615 # 7M 	TZZ)4+=+=>TZZ.0G0GH1133
nn


j!1
234 ~~d44Z8H7II,0  2HNN4#>#>$($4#5$615 # 7M 	TZZ)4+=+=>TZZ.0G0GH1133t44Z8H7II-1  3g
mm+W5NN4++}d:>N.OOP~~d44Z8H7II,0  2HNN4#>#>$($4#5$615 # 7M ..!9!9T*=M<N!N/3 ! 5KTZZ)4+=+=>TZZ.0G0GHMM*k*1133t44Z8H7II-1  3g
mm+W5 4     N)__name__
__module____qualname____firstlineno____doc__r   r!   
empty_corsr   r#   r$   r%   r&   r'   empty_lifecycler   r(   r*   r+   r-   r.   r   r8   __static_attributes__r;   r:   r7   r   r      s    Euouo*L  **X&-'/'// P zz-0U^U^!5)!5)GH96 I96r:   r   )r@   
__future__r   r   r   r   r#   gslib.tests.testcaseteststestcase)gslib.tests.testcase.integration_testcaser   gslib.tests.utilr	   r    gslib.utils.constantsr
   GsUtilIntegrationTestCaser   r;   r:   r7   <module>rL      s=    D & %  '  ' ' ? 0 &Y6x99 Y6r:   