Skip to content

Commit 4b3c735

Browse files
committed
chore: consolite region constants
Signed-off-by: Kevin Shan <[email protected]>
1 parent c65f43a commit 4b3c735

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

scripts/split-canary-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const CODEBUILD_CONFIG_BASE_PATH: string = join(CODEBUILD_CONFIG_PATH, 'canary_w
1616
* - amplify-codegen/scripts/split-e2e-tests.ts
1717
* - amplify-codegen/packages/amplify-codegen-e2e-tests/src/cleanup-e2e-resources.ts
1818
*/
19-
const SUPPORTED_REGIONS_PATH: string = join(REPO_ROOT, 'scripts', 'support-test-regions.json');
20-
const AWS_REGIONS_TO_RUN_TESTS: string[] = JSON.parse(fs.readFileSync(SUPPORTED_REGIONS_PATH, 'utf-8'));
19+
const SUPPORTED_REGIONS_PATH: string = join(REPO_ROOT, 'scripts', 'e2e-test-regions.json');
20+
const AWS_REGIONS_TO_RUN_TESTS: string[] = JSON.parse(fs.readFileSync(SUPPORTED_REGIONS_PATH, 'utf-8')).map(region => region.name);
2121

2222
enum ComputeType {
2323
MEDIUM = 'BUILD_GENERAL1_MEDIUM',

scripts/split-e2e-tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ const DEBUG_FLAG = '--debug';
2525
*
2626
* NOTE: The list of supported regions must be kept in sync amongst all of:
2727
* - the internal pipeline that publishes new lambda layer versions
28-
* - amplify-codegen/scripts/split-e2e-tests.ts
28+
* - amplify-codegen/scripts/split-canary-tests.ts
2929
* - amplify-codegen/packages/amplify-codegen-e2e-tests/src/cleanup-e2e-resources.ts
3030
*/
31-
const SUPPORTED_REGIONS_PATH: string = join(REPO_ROOT, 'scripts', 'support-test-regions.json');
32-
const AWS_REGIONS_TO_RUN_TESTS: string[] = JSON.parse(fs.readFileSync(SUPPORTED_REGIONS_PATH, 'utf-8'));
31+
const SUPPORTED_REGIONS_PATH: string = join(REPO_ROOT, 'scripts', 'e2e-test-regions.json');
32+
const AWS_REGIONS_TO_RUN_TESTS: string[] = JSON.parse(fs.readFileSync(SUPPORTED_REGIONS_PATH, 'utf-8')).map(region => region.name);
3333

3434
export function loadConfigBase() {
3535
return yaml.load(fs.readFileSync(CODEBUILD_CONFIG_BASE_PATH, 'utf8'));

scripts/support-test-regions.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)