-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.backendtestingtype: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.
Description
From this Kokoro job:
____________ TestIAMConfiguration.test_bpo_set_unset_preserves_acls ____________
self = <tests.system.TestIAMConfiguration testMethod=test_bpo_set_unset_preserves_acls>
def test_bpo_set_unset_preserves_acls(self):
new_bucket_name = "bpo-acls" + unique_resource_id("-")
self.assertRaises(
exceptions.NotFound, Config.CLIENT.get_bucket, new_bucket_name
)
bucket = retry_429(Config.CLIENT.create_bucket)(new_bucket_name)
self.case_buckets_to_delete.append(new_bucket_name)
blob_name = "my-blob.txt"
blob = bucket.blob(blob_name)
payload = b"DEADBEEF"
blob.upload_from_string(payload)
# Preserve ACLs before setting BPO
bucket_acl_before = list(bucket.acl)
blob_acl_before = list(bucket.acl)
# Set BPO
bucket.iam_configuration.bucket_policy_only_enabled = True
bucket.patch()
# While BPO is set, cannot get / set ACLs
with self.assertRaises(exceptions.BadRequest):
> bucket.acl.reload()
E AssertionError: BadRequest not raised
tests/system.py:1709: AssertionErrorMetadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.backendtestingtype: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.