
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmc m	Z	 ddl
mZ ddlmZ dd	lmZ  G d
 de	j"                        Zy)=Integration tests for multiple bucket configuration commands.    )absolute_import)print_function)division)unicode_literalsN)	SkipForS3)ObjectToURI)UTF8c                       e Zd ZdZddgZddgZdZdZ ej                  e      Z
ddgZddgZdZd	Z ej                  e      Zd
dgZd
dgZddgZddgZ ed      d        Zy)TestBucketConfigr   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                    | j                         }| j                  | j                  j                  t                    }| j                  | j
                  j                  t                    }| j                  | j                  |t        |      gz          | j                  | j                  t        |      gz   d      }| j                  t        j                  |      | j                         | j                  | j                  |t        |      gz          | j                  | j                  t        |      gz   d      }| j                  | j                  t        |      gz   d      }| j                  t        j                  |      | j                         | j                  t        j                  |      | j                          | j#                         s)| j                  | j$                  dt        |      gz          | j                  | j                  t        |      gz   d      }| j                  | j                  t        |      gz   d      }| j                  t        j                  |      | j                         | j                  t        j                  |      | j                          | j#                         s<| j                  | j&                  t        |      gz   d      }| j)                  d|       | j                  | j*                  dt        |      gz          | j                  | j                  t        |      gz   d      }| j                  | j                  t        |      gz   d      }| j                  | j,                  t        |      gz   d      }| j                  t        j                  |      | j                         | j                  t        j                  |      | j                          | j)                  d|       | j#                         s=| j                  | j&                  t        |      gz   d      }| j)                  d|       yy)	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_configz&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
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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t44Z8H7II-1  3g
mm+W5 4    N)__name__
__module____qualname____doc__r   r    
empty_corsr   r"   r#   r$   r%   r&   empty_lifecycler   r'   r)   r*   r,   r-   r   r7    r8   r6   r   r      s    Euouo*L  $**X&-'/'// P !tzz-0U^U^!5)!5)GH96 I96r8   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?   r8   r6   <module>rH      s=    D & %  '  ' ' ? 0 &Y6x99 Y6r8   