Same test run as #7384.
___________________TestStorageBuckets.test_lifecycle_rules____________________self=<tests.system.TestStorageBucketstestMethod=test_lifecycle_rules>deftest_lifecycle_rules(self):
new_bucket_name="w-lifcycle-rules"+unique_resource_id("-")
self.assertRaises(
exceptions.NotFound, Config.CLIENT.get_bucket, new_bucket_name
)
bucket=Config.CLIENT.bucket(new_bucket_name)
bucket.add_lifecycle_delete_rule(age=42)
bucket.add_lifecycle_set_storage_class_rule(
"COLDLINE", is_live=False, matches_storage_class=["NEARLINE"]
)
expected_rules= [
LifecycleRuleDelete(age=42),
LifecycleRuleSetStorageClass(
"COLDLINE", is_live=False, matches_storage_class=["NEARLINE"]
),
]
>retry_429(bucket.create)(location="us")
...
response=self._make_request(
method=method,
url=url,
data=data,
content_type=content_type,
headers=headers,
target_object=_target_object,
)
ifnot200<=response.status_code<300:
>raiseexceptions.from_http_response(response)
Egoogle.api_core.exceptions.TooManyRequests: 429POSThttps://www.googleapis.com/storage/v1/b?project=precise-truck-742: Theprojectexceededtheratelimitforcreatinganddeletingbuckets.
Same test run as #7384.