mirror of
https://github.com/prowler-cloud/prowler.git
synced 2025-12-18 21:07:48 +00:00
fix(gcp): store Cloud Storage bucket regions as lowercase (#9567)
This commit is contained in:
@@ -27,6 +27,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
|
||||
### Fixed
|
||||
- Fix typo `trustboundaries` category to `trust-boundaries` [(#9536)](https://github.com/prowler-cloud/prowler/pull/9536)
|
||||
- Store MongoDB Atlas provider regions as lowercase [(#9554)](https://github.com/prowler-cloud/prowler/pull/9554)
|
||||
- Store GCP Cloud Storage bucket regions as lowercase [(#9567)](https://github.com/prowler-cloud/prowler/pull/9567)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class CloudStorage(GCPService):
|
||||
Bucket(
|
||||
name=bucket["name"],
|
||||
id=bucket["id"],
|
||||
region=bucket["location"],
|
||||
region=bucket["location"].lower(),
|
||||
uniform_bucket_level_access=bucket["iamConfiguration"][
|
||||
"uniformBucketLevelAccess"
|
||||
]["enabled"],
|
||||
|
||||
@@ -35,7 +35,7 @@ class TestCloudStorageService:
|
||||
assert len(cloudstorage_client.buckets) == 2
|
||||
assert cloudstorage_client.buckets[0].name == "bucket1"
|
||||
assert cloudstorage_client.buckets[0].id.__class__.__name__ == "str"
|
||||
assert cloudstorage_client.buckets[0].region == "US"
|
||||
assert cloudstorage_client.buckets[0].region == "us"
|
||||
assert cloudstorage_client.buckets[0].uniform_bucket_level_access
|
||||
assert cloudstorage_client.buckets[0].public
|
||||
|
||||
@@ -53,7 +53,7 @@ class TestCloudStorageService:
|
||||
|
||||
assert cloudstorage_client.buckets[1].name == "bucket2"
|
||||
assert cloudstorage_client.buckets[1].id.__class__.__name__ == "str"
|
||||
assert cloudstorage_client.buckets[1].region == "EU"
|
||||
assert cloudstorage_client.buckets[1].region == "eu"
|
||||
assert not cloudstorage_client.buckets[1].uniform_bucket_level_access
|
||||
assert not cloudstorage_client.buckets[1].public
|
||||
assert cloudstorage_client.buckets[1].retention_policy is None
|
||||
|
||||
Reference in New Issue
Block a user