From a1d16203428d6d2ea3b2ee048b310fdef1b24c60 Mon Sep 17 00:00:00 2001 From: Tim Schmelter Date: Thu, 29 Aug 2024 11:08:57 -0700 Subject: [PATCH] test: pin custom_policies_container test region (#2817) --- codebuild_specs/e2e_workflow.yml | 2 +- scripts/split-e2e-tests.ts | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/codebuild_specs/e2e_workflow.yml b/codebuild_specs/e2e_workflow.yml index dd4d318e32..a89affc925 100644 --- a/codebuild_specs/e2e_workflow.yml +++ b/codebuild_specs/e2e_workflow.yml @@ -104,7 +104,7 @@ batch: variables: TEST_SUITE: >- src/__tests__/graphql-v2/lambda-conflict-handler.test.ts|src/__tests__/graphql-v2/index-with-stack-mappings.test.ts|src/__tests__/schema-iterative-update-2.test.ts|src/__tests__/custom_policies_container.test.ts - CLI_REGION: us-east-2 + CLI_REGION: us-east-1 depend-on: - publish_to_local_registry - identifier: api_4_containers_api_secrets_api_5_schema_function_1 diff --git a/scripts/split-e2e-tests.ts b/scripts/split-e2e-tests.ts index a59771ae6a..c9abfc5871 100644 --- a/scripts/split-e2e-tests.ts +++ b/scripts/split-e2e-tests.ts @@ -30,8 +30,6 @@ const v1TransformerSupportedRegions = JSON.parse(fs.readFileSync(v1TransformerSu (region: TestRegion) => region.name, ); -type ForceTests = 'interactions' | 'containers'; - type TestTiming = { test: string; medianRuntime: number; @@ -75,6 +73,7 @@ type CandidateJob = { const FORCE_REGION_MAP = { interactions: 'us-west-2', containers: 'us-east-1', + custom_policies_container: 'us-east-1', 'sql-pg-canary': 'us-east-1', }; @@ -316,10 +315,10 @@ const setJobRegion = (test: string, job: CandidateJob, jobIdx: number, useBetaLa const FORCE_REGION = Object.keys(FORCE_REGION_MAP).find((key) => { const testName = getTestNameFromPath(test); return testName.startsWith(key); - }); + }) as keyof typeof FORCE_REGION_MAP; if (FORCE_REGION) { - job.region = FORCE_REGION_MAP[FORCE_REGION as ForceTests]; + job.region = FORCE_REGION_MAP[FORCE_REGION]; return; }