From ecd124175190b40a0c0ca52cc1b7ba2e601f3915 Mon Sep 17 00:00:00 2001 From: Christoffer Rehn <1280602+hoffa@users.noreply.github.com> Date: Wed, 15 Mar 2023 14:55:35 -0700 Subject: [PATCH] fix: remove Region/SetIdentifier-related integration tests --- ...custom_http_api_domains_latency_routing.py | 25 -------- ...m_http_api_domains_latency_routing_ipv6.py | 25 -------- ...stom_domains_regional_latency_routing.json | 42 -------------- ...domains_regional_latency_routing_ipv6.json | 42 -------------- ...stom_domains_regional_latency_routing.yaml | 57 ------------------ ...domains_regional_latency_routing_ipv6.yaml | 58 ------------------- 6 files changed, 249 deletions(-) delete mode 100644 integration/combination/test_custom_http_api_domains_latency_routing.py delete mode 100644 integration/combination/test_custom_http_api_domains_latency_routing_ipv6.py delete mode 100644 integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing.json delete mode 100644 integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing_ipv6.json delete mode 100644 integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing.yaml delete mode 100644 integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing_ipv6.yaml diff --git a/integration/combination/test_custom_http_api_domains_latency_routing.py b/integration/combination/test_custom_http_api_domains_latency_routing.py deleted file mode 100644 index 920569405..000000000 --- a/integration/combination/test_custom_http_api_domains_latency_routing.py +++ /dev/null @@ -1,25 +0,0 @@ -from unittest.case import skipIf - -from integration.config.service_names import CUSTOM_DOMAIN -from integration.helpers.base_internal_test import BaseInternalTest -from integration.helpers.resource import current_region_not_included - - -@skipIf( - current_region_not_included([CUSTOM_DOMAIN]), - "CustomDomain is not supported in this testing region", -) -class TestCustomHttpApiDomainsLatencyRouting(BaseInternalTest): - def test_custom_http_api_domains_regional(self): - self.create_and_verify_stack("combination/api_with_custom_domains_regional_latency_routing") - - route53_list = self.get_stack_resources("AWS::Route53::RecordSetGroup") - self.assertEqual(1, len(route53_list)) - - client = self.client_provider.route53_client - result = client.list_resource_record_sets(HostedZoneId="xyz") - record_set_list = result["ResourceRecordSets"] - record_set = next(r for r in record_set_list if r["Name"] == "test.domain.com" & r["Type"] == "A") - - self.assertIsNotNone(record_set["SetIdentifier"]) - self.assertIsNotNone(record_set["Region"]) diff --git a/integration/combination/test_custom_http_api_domains_latency_routing_ipv6.py b/integration/combination/test_custom_http_api_domains_latency_routing_ipv6.py deleted file mode 100644 index 625cdb08c..000000000 --- a/integration/combination/test_custom_http_api_domains_latency_routing_ipv6.py +++ /dev/null @@ -1,25 +0,0 @@ -from unittest.case import skipIf - -from integration.config.service_names import CUSTOM_DOMAIN -from integration.helpers.base_internal_test import BaseInternalTest -from integration.helpers.resource import current_region_not_included - - -@skipIf( - current_region_not_included([CUSTOM_DOMAIN]), - "CustomDomain is not supported in this testing region", -) -class TestCustomHttpApiDomainsLatencyRoutingIpV6(BaseInternalTest): - def test_custom_http_api_domains_regional(self): - self.create_and_verify_stack("combination/api_with_custom_domains_regional_latency_routing_ipv6") - - route53_list = self.get_stack_resources("AWS::Route53::RecordSetGroup") - self.assertEqual(1, len(route53_list)) - - client = self.client_provider.route53_client - result = client.list_resource_record_sets(HostedZoneId="xyz") - record_set_list = result["ResourceRecordSets"] - record_set = next(r for r in record_set_list if r["Name"] == "test.domain.com" & r["Type"] == "AAAA") - - self.assertIsNotNone(record_set["SetIdentifier"]) - self.assertIsNotNone(record_set["Region"]) diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing.json b/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing.json deleted file mode 100644 index c069daf32..000000000 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "LogicalResourceId": "MyFunctionImplicitGetPermission", - "ResourceType": "AWS::Lambda::Permission" - }, - { - "LogicalResourceId": "MyFunctionImplicitPostPermission", - "ResourceType": "AWS::Lambda::Permission" - }, - { - "LogicalResourceId": "MyApipostApiMapping", - "ResourceType": "AWS::ApiGatewayV2::ApiMapping" - }, - { - "LogicalResourceId": "MyApigetApiMapping", - "ResourceType": "AWS::ApiGatewayV2::ApiMapping" - }, - { - "LogicalResourceId": "MyApi", - "ResourceType": "AWS::ApiGatewayV2::Api" - }, - { - "LogicalResourceId": "RecordSetGroupddfc299be2", - "ResourceType": "AWS::Route53::RecordSetGroup" - }, - { - "LogicalResourceId": "MyApiProdStage", - "ResourceType": "AWS::ApiGatewayV2::Stage" - }, - { - "LogicalResourceId": "ApiGatewayDomainNameV2e7a0af471b", - "ResourceType": "AWS::ApiGatewayV2::DomainName" - }, - { - "LogicalResourceId": "MyFunction", - "ResourceType": "AWS::Lambda::Function" - }, - { - "LogicalResourceId": "MyFunctionRole", - "ResourceType": "AWS::IAM::Role" - } -] diff --git a/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing_ipv6.json b/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing_ipv6.json deleted file mode 100644 index c069daf32..000000000 --- a/integration/resources/expected/combination/api_with_custom_domains_regional_latency_routing_ipv6.json +++ /dev/null @@ -1,42 +0,0 @@ -[ - { - "LogicalResourceId": "MyFunctionImplicitGetPermission", - "ResourceType": "AWS::Lambda::Permission" - }, - { - "LogicalResourceId": "MyFunctionImplicitPostPermission", - "ResourceType": "AWS::Lambda::Permission" - }, - { - "LogicalResourceId": "MyApipostApiMapping", - "ResourceType": "AWS::ApiGatewayV2::ApiMapping" - }, - { - "LogicalResourceId": "MyApigetApiMapping", - "ResourceType": "AWS::ApiGatewayV2::ApiMapping" - }, - { - "LogicalResourceId": "MyApi", - "ResourceType": "AWS::ApiGatewayV2::Api" - }, - { - "LogicalResourceId": "RecordSetGroupddfc299be2", - "ResourceType": "AWS::Route53::RecordSetGroup" - }, - { - "LogicalResourceId": "MyApiProdStage", - "ResourceType": "AWS::ApiGatewayV2::Stage" - }, - { - "LogicalResourceId": "ApiGatewayDomainNameV2e7a0af471b", - "ResourceType": "AWS::ApiGatewayV2::DomainName" - }, - { - "LogicalResourceId": "MyFunction", - "ResourceType": "AWS::Lambda::Function" - }, - { - "LogicalResourceId": "MyFunctionRole", - "ResourceType": "AWS::IAM::Role" - } -] diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing.yaml deleted file mode 100644 index 24bd94678..000000000 --- a/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing.yaml +++ /dev/null @@ -1,57 +0,0 @@ -Parameters: - MyRestRegionalDomainName: - Type: String - MyRestRegionalDomainCert: - Type: String - HostedZoneId: - Type: String - -Globals: - Api: - Domain: - DomainName: - Ref: MyRestRegionalDomainName - CertificateArn: - Ref: MyRestRegionalDomainCert - EndpointConfiguration: REGIONAL - MutualTlsAuthentication: - TruststoreUri: ${mtlsuri} - TruststoreVersion: 0 - SecurityPolicy: TLS_1_2 - BasePath: - - /get - - /post - Route53: - HostedZoneId: - Ref: HostedZoneId - Region: eu-west-2 - SetIdentifier: eu-west-2 - DistributionDomainName: test.domain.com - -Resources: - MyFunction: - Type: AWS::Serverless::Function - Properties: - InlineCode: | - exports.handler = async (event) => { - const response = { - statusCode: 200, - body: JSON.stringify('Hello from Lambda!'), - }; - return response; - }; - Handler: index.handler - Runtime: nodejs14.x - Events: - ImplicitGet: - Type: Api - Properties: - Method: Get - Path: /get - ImplicitPost: - Type: Api - Properties: - Method: Post - Path: /post -Metadata: - SamTransformTest: true diff --git a/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing_ipv6.yaml b/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing_ipv6.yaml deleted file mode 100644 index ab5334a3d..000000000 --- a/integration/resources/templates/combination/api_with_custom_domains_regional_latency_routing_ipv6.yaml +++ /dev/null @@ -1,58 +0,0 @@ -Parameters: - MyRestRegionalDomainName: - Type: String - MyRestRegionalDomainCert: - Type: String - HostedZoneId: - Type: String - -Globals: - Api: - Domain: - DomainName: - Ref: MyRestRegionalDomainName - CertificateArn: - Ref: MyRestRegionalDomainCert - EndpointConfiguration: REGIONAL - MutualTlsAuthentication: - TruststoreUri: ${mtlsuri} - TruststoreVersion: 0 - SecurityPolicy: TLS_1_2 - BasePath: - - /get - - /post - Route53: - HostedZoneId: - Ref: HostedZoneId - Region: eu-west-2 - SetIdentifier: eu-west-2 - DistributionDomainName: test.domain.com - IpV6: true - -Resources: - MyFunction: - Type: AWS::Serverless::Function - Properties: - InlineCode: | - exports.handler = async (event) => { - const response = { - statusCode: 200, - body: JSON.stringify('Hello from Lambda!'), - }; - return response; - }; - Handler: index.handler - Runtime: nodejs14.x - Events: - ImplicitGet: - Type: Api - Properties: - Method: Get - Path: /get - ImplicitPost: - Type: Api - Properties: - Method: Post - Path: /post -Metadata: - SamTransformTest: true