Skip to content

Commit

Permalink
Merge pull request #3090 from kyleknap/remove-psuedo-fips-region-tests
Browse files Browse the repository at this point in the history
Remove legacy pseudo FIPS region tests
  • Loading branch information
kyleknap authored Dec 18, 2023
2 parents 70e7330 + 1533bc0 commit b2a1ac9
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions tests/functional/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,47 +121,3 @@ def test_client_name_matches_hyphenized_service_id(service_name):
f"expected service name we computed: `{computed_name}`"
)
assert computed_name == actual_service_name, err_msg


_S3_ALLOWED_PSEUDO_FIPS_REGIONS = [
'fips-accesspoint-ca-central-1',
'fips-accesspoint-us-east-1',
'fips-accesspoint-us-east-2',
'fips-accesspoint-us-west-1',
'fips-accesspoint-us-west-2',
'fips-accesspoint-us-gov-east-1',
'fips-accesspoint-us-gov-west-1',
'fips-us-gov-west-1',
'fips-us-gov-east-1',
'fips-ca-central-1',
'fips-us-east-1',
'fips-us-east-2',
'fips-us-west-1',
'fips-us-west-2',
]


def _s3_region_names():
endpoints = LOADER.load_data('endpoints')

for partition in endpoints['partitions']:
s3_service = partition['services'].get('s3', {})
for region_name in s3_service.get('endpoints', []):
yield region_name.lower()


@pytest.mark.parametrize("region_name", _s3_region_names())
def test_no_s3_fips_regions(region_name):
# Fail if additional FIPS pseudo-regions are added to S3.
# This may be removed once proper support is implemented for FIPS in S3.
if region_name in _S3_ALLOWED_PSEUDO_FIPS_REGIONS:
return

err_msg = (
'New S3 FIPS pseudo-region added: "{region_name}". '
'FIPS has compliancy requirements that may not be met in all cases '
'for S3 clients due to the custom endpoint resolution and '
'construction logic.'
)

assert 'fips' not in region_name, err_msg

0 comments on commit b2a1ac9

Please sign in to comment.