diff --git a/integration/config/region_service_exclusion.yaml b/integration/config/region_service_exclusion.yaml deleted file mode 100644 index 9a939aa8a..000000000 --- a/integration/config/region_service_exclusion.yaml +++ /dev/null @@ -1,235 +0,0 @@ -regions: - af-south-1: - - ServerlessRepo - - Cognito - - KMS - - CodeDeploy - - XRay - - IoT - - GatewayResponses - - HttpApi - - ARM - - MSK - - MQ - ap-east-1: - - Cognito - - IoT - - ServerlessRepo - - HttpApi - - ARM - ap-northeast-2: - - HttpApi - - ARM - ap-northeast-3: - - Cognito - - IoT - - ServerlessRepo - - XRay - - CodeDeploy - - HttpApi - - ARM - - MSK - - MQ - - EFS - - StateMachineCweCws - - CodeSign - ap-south-1: - - HttpApi - ap-southeast-3: - - ServerlessRepo - - CodeDeploy - - Cognito - - GatewayResponses - - Layers - - IoT - - XRay - - SQS - - HttpApi - - UsagePlans - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - EFS - - CweCwsDlq - - StateMachineInlineDefinition - - StateMachineCweCws - - StateMachineWithApis - - LambdaEnvVars - - ARM - ap-southeast-1: - - HttpApi - ca-central-1: - - Cognito - - IoT - - HttpApi - - ARM - cn-north-1: - - ServerlessRepo - - Cognito - - KMS - - CodeDeploy - - XRay - - IoT - - GatewayResponses - - HttpApi - - MSK - - MQ - - CodeSign - - CweCwsDlq - - Mode - - ARM - cn-northwest-1: - - ServerlessRepo - - Cognito - - KMS - - CodeDeploy - - XRay - - IoT - - GatewayResponses - - HttpApi - - ARM - - MSK - - MQ - - CodeSign - - CweCwsDlq - - Mode - eu-north-1: - - ServerlessRepo - - Cognito - - IoT - - HttpApi - - Layers - - ARM - eu-south-1: - - ServerlessRepo - - Cognito - - KMS - - CodeDeploy - - XRay - - IoT - - GatewayResponses - - HttpApi - - ARM - - MSK - - MQ - eu-west-2: - - HttpApi - eu-west-3: - - Cognito - - IoT - - XRay - - HttpApi - - ARM - me-south-1: - - ServerlessRepo - - Cognito - - IoT - - HttpApi - - ARM - sa-east-1: - - IoT - - Cognito - - HttpApi - - ARM - us-east-2: - - HttpApi - us-gov-east-1: - - ServerlessRepo - - Cognito - - XRay - - IoT - - GatewayResponses - - CodeDeploy - - HttpApi - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - CweCwsDlq - - Mode - - ARM - us-gov-west-1: - - ServerlessRepo - - Cognito - - XRay - - IoT - - GatewayResponses - - HttpApi - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - CweCwsDlq - - Mode - - ARM - us-iso-east-1: - - ServerlessRepo - - CodeDeploy - - Cognito - - GatewayResponses - - Layers - - IoT - - XRay - - SQS - - HttpApi - - UsagePlans - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - EFS - - CweCwsDlq - - StateMachineInlineDefinition - - StateMachineCweCws - - StateMachineWithApis - - LambdaEnvVars - us-iso-west-1: - - ServerlessRepo - - CodeDeploy - - Cognito - - GatewayResponses - - Layers - - IoT - - XRay - - SQS - - HttpApi - - UsagePlans - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - EFS - - CweCwsDlq - - StateMachineInlineDefinition - - StateMachineCweCws - - StateMachineWithApis - - LambdaEnvVars - us-isob-east-1: - - ServerlessRepo - - Cognito - - CodeDeploy - - XRay - - GatewayResponses - - Layers - - IoT - - SQS - - HttpApi - - UsagePlans - - MSK - - MQ - - Kinesis - - DynamoDB - - CodeSign - - EFS - - CweCwsDlq - - StateMachineInlineDefinition - us-west-1: - - Cognito - - IoT - - ARM diff --git a/integration/config/region_service_inclusion.yaml b/integration/config/region_service_inclusion.yaml deleted file mode 100644 index 14625b38d..000000000 --- a/integration/config/region_service_inclusion.yaml +++ /dev/null @@ -1,3 +0,0 @@ -regions: - us-east-1: - - CustomDomain \ No newline at end of file diff --git a/integration/helpers/resource.py b/integration/helpers/resource.py index 704d0f3aa..f70f56462 100644 --- a/integration/helpers/resource.py +++ b/integration/helpers/resource.py @@ -141,8 +141,10 @@ def _get_region(): def _read_test_config_file(filename): """Reads test inclusion or exclusion file and returns the contents""" tests_integ_dir = Path(__file__).resolve().parents[1] - test_config_file_path = str(Path(tests_integ_dir, "config", filename)) - test_config = load_yaml(test_config_file_path) + test_config_file_path = Path(tests_integ_dir, "config", filename) + if not test_config_file_path.is_file(): + return {} + test_config = load_yaml(str(test_config_file_path)) return test_config @@ -164,7 +166,7 @@ def current_region_does_not_support(services): region = _get_region() region_exclude_services = _read_test_config_file("region_service_exclusion.yaml") - if region not in region_exclude_services["regions"]: + if region not in region_exclude_services.get("regions", {}): return False # check if any one of the services is in the excluded services for current testing region @@ -179,7 +181,7 @@ def current_region_not_included(services): region = _get_region() region_include_services = _read_test_config_file("region_service_inclusion.yaml") - if region not in region_include_services["regions"]: + if region not in region_include_services.get("regions", {}): return True # check if any one of the services is in the excluded services for current testing region