Skip to content

Commit

Permalink
test: pin custom_policies_container test region (#2817)
Browse files Browse the repository at this point in the history
  • Loading branch information
palpatim authored Aug 29, 2024
1 parent 3bcfe64 commit a1d1620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion codebuild_specs/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions scripts/split-e2e-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
};

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit a1d1620

Please sign in to comment.