-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.
Description
The GCS systests predate widespread adoption of pytest idioms within the organization.
Steps:
- Add
conftest.py. - Replace
Config.CLIENTwith a session-scopedclientfixture. - Replace
Config.TEST_BUCKETwith a session-scopedbucketfixture. - Replace
Config.TESTING_MTLSwith a session-scopedtesting_mtlsfixture. - Replace
TestClient.setupClasswith a fixture which requires service account creds. - Replace
TestClient.setUpandTestClient.tearDownwith a class-scope fixture which deletes created HMAC key metadata instances. - Replace
TestClient._get_before_hmac_keys(pre-scrubs old HMAC key metadata to avoid quota issues) with a function-scope fixture. - Replace
TestStorageBuckets.setUpandTestStorageBuckets.tearDownwith a functon-scope fixture which deletes created buckets. - Replace
TestStorageFiles.setUpClasswith a class-scope fixture which populates file metadata fromcls.FILES. - Replace
TestStorageFiles.setUpandTestStorageFiles.tearDownwith a function-scope fixture which deletes created blobs. - Replace
TestStorageWriteFiles.setUpClasswith the fixture (defined above) requiring service account credentials. - Replace
TestStorageListFiles.setUpClass/TestStorageListFiles.tearDownClasswith a class-scoped fixture which scrubs, populates, and scrubs the bucket. - Replace
TestStoragePseudoHierarchy.setUpClass/TestStoragePseudoHierarchy.tearDownClasswith a class-scoped fixture which scrubs, populates, and scrubs the bucket. - Replace
TestStorageSignURLs.setupClasswith the fixuture (defined above) requiring service account credentials, plus another (replacing alsotearDownClass) which creates, populates, empties, and deletes a bucket. - Replace
TestStorageNotificationCRUD.setUpClasswith the fixture (defined above) which skips the tests iftesting_mtls(defined above) is true. - Replace
TestStorageNotificationCRUD.setUp/TestStorageNotificationCRUD.tearDownwith a function-scope fixture creating a bucket, adding notification to it, and then tearing both down. - Replace
TestKMSIntegration.setUpClasswith a fixture skipping undermTLS, plus scrubbing bucket. - Replace
TestKMSIntegration.setUp(notearDown???) with a fixture populating the keyring. - Replace
TestRetentionPolicy.setUp/TestRetentionPolicy.tearDownwith a function-scope fixture resetting / deleting created blobs, and deleting any created buckets. - Replace
TestIAMConfiguration.setUp/TestIAMConfiguration.tearDownwith a function-scope fixture deleting any created buckets. - Replace
TestV4POSTPolicies.setUpClasswith fixture (defined above) requiring service account creds. - Replace
TestV4POSTPolicies.setUp/TestV4POSTPolicies.tearDownwith a function-scope fixture deleting any created buckets. - Break
tests/system/test_system.pyinto modules based on entities tested.
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.