From 6cec107de268fb482b141cf3138e383297373b39 Mon Sep 17 00:00:00 2001 From: UnleashedMind Date: Tue, 22 Sep 2020 11:56:32 -0700 Subject: [PATCH] test(amplify-e2e-tests): change test region (#5377) Co-authored-by: UnleashedMind --- .circleci/config.yml | 224 +++++++++--------- .../tests/function-differentRegion.ts | 2 +- 2 files changed, 113 insertions(+), 113 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da3ca92c13b..a26ff94d19b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -769,229 +769,229 @@ jobs: when: always - store_artifacts: path: ../uitest_android_results - tags-amplify_e2e_tests: + amplify-configure-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/tags.test.ts + TEST_SUITE: src/__tests__/amplify-configure.test.ts CLI_REGION: us-east-2 - schema-function-amplify_e2e_tests: + api_1-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-function.test.ts + TEST_SUITE: src/__tests__/api_1.test.ts CLI_REGION: us-west-2 - api_1-amplify_e2e_tests: + api_2-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/api_1.test.ts + TEST_SUITE: src/__tests__/api_2.test.ts CLI_REGION: eu-west-2 - api_2-amplify_e2e_tests: + auth_1-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/api_2.test.ts + TEST_SUITE: src/__tests__/auth_1.test.ts CLI_REGION: eu-central-1 - auth_1-amplify_e2e_tests: + auth_2-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/auth_1.test.ts + TEST_SUITE: src/__tests__/auth_2.test.ts CLI_REGION: ap-northeast-1 - auth_2-amplify_e2e_tests: + env-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/auth_2.test.ts + TEST_SUITE: src/__tests__/env.test.ts CLI_REGION: ap-southeast-1 - schema-data-access-patterns-amplify_e2e_tests: + feature-flags-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts + TEST_SUITE: src/__tests__/feature-flags.test.ts CLI_REGION: ap-southeast-2 - schema-searchable-amplify_e2e_tests: + function_1-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-searchable.test.ts + TEST_SUITE: src/__tests__/function_1.test.ts CLI_REGION: us-east-2 - env-amplify_e2e_tests: + function_2-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/env.test.ts + TEST_SUITE: src/__tests__/function_2.test.ts CLI_REGION: us-west-2 - feature-flags-amplify_e2e_tests: + init-special-case-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/feature-flags.test.ts + TEST_SUITE: src/__tests__/init-special-case.test.ts CLI_REGION: eu-west-2 - function_1-amplify_e2e_tests: + layer-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/function_1.test.ts + TEST_SUITE: src/__tests__/layer.test.ts CLI_REGION: eu-central-1 - function_2-amplify_e2e_tests: + schema-auth-1-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/function_2.test.ts + TEST_SUITE: src/__tests__/schema-auth-1.test.ts CLI_REGION: ap-northeast-1 - schema-connection-amplify_e2e_tests: + schema-auth-2-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-connection.test.ts + TEST_SUITE: src/__tests__/schema-auth-2.test.ts CLI_REGION: ap-southeast-1 - schema-predictions-amplify_e2e_tests: + schema-auth-3-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-predictions.test.ts + TEST_SUITE: src/__tests__/schema-auth-3.test.ts CLI_REGION: ap-southeast-2 - init-special-case-amplify_e2e_tests: + schema-auth-4-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/init-special-case.test.ts + TEST_SUITE: src/__tests__/schema-auth-4.test.ts CLI_REGION: us-east-2 - schema-auth-8-amplify_e2e_tests: + schema-auth-5-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-8.test.ts + TEST_SUITE: src/__tests__/schema-auth-5.test.ts CLI_REGION: us-west-2 - schema-versioned-amplify_e2e_tests: + schema-auth-6-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-versioned.test.ts + TEST_SUITE: src/__tests__/schema-auth-6.test.ts CLI_REGION: eu-west-2 - layer-amplify_e2e_tests: + schema-auth-7-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/layer.test.ts + TEST_SUITE: src/__tests__/schema-auth-7.test.ts CLI_REGION: eu-central-1 - schema-model-amplify_e2e_tests: + schema-auth-8-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-model.test.ts + TEST_SUITE: src/__tests__/schema-auth-8.test.ts CLI_REGION: ap-northeast-1 - amplify-configure-amplify_e2e_tests: + schema-connection-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/amplify-configure.test.ts + TEST_SUITE: src/__tests__/schema-connection.test.ts CLI_REGION: ap-southeast-1 - schema-auth-7-amplify_e2e_tests: + schema-data-access-patterns-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-7.test.ts + TEST_SUITE: src/__tests__/schema-data-access-patterns.test.ts CLI_REGION: ap-southeast-2 - schema-key-amplify_e2e_tests: + schema-function-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-key.test.ts + TEST_SUITE: src/__tests__/schema-function.test.ts CLI_REGION: us-east-2 - schema-auth-1-amplify_e2e_tests: + schema-key-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-1.test.ts + TEST_SUITE: src/__tests__/schema-key.test.ts CLI_REGION: us-west-2 - schema-auth-2-amplify_e2e_tests: + schema-model-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-2.test.ts + TEST_SUITE: src/__tests__/schema-model.test.ts CLI_REGION: eu-west-2 - schema-auth-3-amplify_e2e_tests: + schema-predictions-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-3.test.ts + TEST_SUITE: src/__tests__/schema-predictions.test.ts CLI_REGION: eu-central-1 - schema-auth-4-amplify_e2e_tests: + schema-searchable-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-4.test.ts + TEST_SUITE: src/__tests__/schema-searchable.test.ts CLI_REGION: ap-northeast-1 - schema-auth-5-amplify_e2e_tests: + schema-versioned-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-5.test.ts + TEST_SUITE: src/__tests__/schema-versioned.test.ts CLI_REGION: ap-southeast-1 - schema-auth-6-amplify_e2e_tests: + tags-amplify_e2e_tests: working_directory: ~/repo docker: *ref_0 resource_class: large steps: *ref_1 environment: - TEST_SUITE: src/__tests__/schema-auth-6.test.ts + TEST_SUITE: src/__tests__/tags.test.ts CLI_REGION: ap-southeast-2 plugin-amplify_e2e_tests: working_directory: ~/repo @@ -1189,26 +1189,26 @@ workflows: - amplify_console_integration_tests - amplify_migration_tests_latest - amplify_migration_tests_v4 - - schema-key-amplify_e2e_tests + - schema-function-amplify_e2e_tests - plugin-amplify_e2e_tests - hostingPROD-amplify_e2e_tests - - schema-auth-1-amplify_e2e_tests + - schema-key-amplify_e2e_tests - datastore-modegen-amplify_e2e_tests - predictions-amplify_e2e_tests - - schema-auth-2-amplify_e2e_tests + - schema-model-amplify_e2e_tests - interactions-amplify_e2e_tests - delete-amplify_e2e_tests - - schema-auth-3-amplify_e2e_tests + - schema-predictions-amplify_e2e_tests - hosting-amplify_e2e_tests - storage-amplify_e2e_tests - - schema-auth-4-amplify_e2e_tests + - schema-searchable-amplify_e2e_tests - init-amplify_e2e_tests - migration-api-key-migration-amplify_e2e_tests - - schema-auth-5-amplify_e2e_tests + - schema-versioned-amplify_e2e_tests - amplify-app-amplify_e2e_tests - migration-api-connection-migration-amplify_e2e_tests - - schema-auth-7-amplify_e2e_tests - - schema-auth-6-amplify_e2e_tests + - schema-data-access-patterns-amplify_e2e_tests + - tags-amplify_e2e_tests - analytics-amplify_e2e_tests filters: branches: @@ -1216,7 +1216,7 @@ workflows: - release - master - beta - - tags-amplify_e2e_tests: + - amplify-configure-amplify_e2e_tests: filters: &ref_2 branches: only: @@ -1224,183 +1224,183 @@ workflows: - graphqlschemae2e requires: - publish_to_local_registry - - schema-searchable-amplify_e2e_tests: + - function_1-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - init-special-case-amplify_e2e_tests: + - schema-auth-4-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-key-amplify_e2e_tests: + - schema-function-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - tags-amplify_e2e_tests + - amplify-configure-amplify_e2e_tests - plugin-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-searchable-amplify_e2e_tests + - function_1-amplify_e2e_tests - hostingPROD-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - init-special-case-amplify_e2e_tests - - schema-function-amplify_e2e_tests: + - schema-auth-4-amplify_e2e_tests + - api_1-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - env-amplify_e2e_tests: + - function_2-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-8-amplify_e2e_tests: + - schema-auth-5-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-1-amplify_e2e_tests: + - schema-key-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-function-amplify_e2e_tests + - api_1-amplify_e2e_tests - datastore-modegen-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - env-amplify_e2e_tests + - function_2-amplify_e2e_tests - predictions-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-8-amplify_e2e_tests - - api_1-amplify_e2e_tests: + - schema-auth-5-amplify_e2e_tests + - api_2-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - feature-flags-amplify_e2e_tests: + - init-special-case-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-versioned-amplify_e2e_tests: + - schema-auth-6-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-2-amplify_e2e_tests: + - schema-model-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - api_1-amplify_e2e_tests + - api_2-amplify_e2e_tests - interactions-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - feature-flags-amplify_e2e_tests + - init-special-case-amplify_e2e_tests - delete-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-versioned-amplify_e2e_tests - - api_2-amplify_e2e_tests: + - schema-auth-6-amplify_e2e_tests + - auth_1-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - function_1-amplify_e2e_tests: + - layer-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - layer-amplify_e2e_tests: + - schema-auth-7-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-3-amplify_e2e_tests: + - schema-predictions-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - api_2-amplify_e2e_tests + - auth_1-amplify_e2e_tests - hosting-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - function_1-amplify_e2e_tests + - layer-amplify_e2e_tests - storage-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - layer-amplify_e2e_tests - - auth_1-amplify_e2e_tests: + - schema-auth-7-amplify_e2e_tests + - auth_2-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - function_2-amplify_e2e_tests: + - schema-auth-1-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-model-amplify_e2e_tests: + - schema-auth-8-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-4-amplify_e2e_tests: + - schema-searchable-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - auth_1-amplify_e2e_tests + - auth_2-amplify_e2e_tests - init-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - function_2-amplify_e2e_tests + - schema-auth-1-amplify_e2e_tests - migration-api-key-migration-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-model-amplify_e2e_tests - - auth_2-amplify_e2e_tests: + - schema-auth-8-amplify_e2e_tests + - env-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-connection-amplify_e2e_tests: + - schema-auth-2-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - amplify-configure-amplify_e2e_tests: + - schema-connection-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-5-amplify_e2e_tests: + - schema-versioned-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - auth_2-amplify_e2e_tests + - env-amplify_e2e_tests - amplify-app-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-connection-amplify_e2e_tests + - schema-auth-2-amplify_e2e_tests - migration-api-connection-migration-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - amplify-configure-amplify_e2e_tests - - schema-data-access-patterns-amplify_e2e_tests: + - schema-connection-amplify_e2e_tests + - feature-flags-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-predictions-amplify_e2e_tests: + - schema-auth-3-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-7-amplify_e2e_tests: + - schema-data-access-patterns-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-auth-6-amplify_e2e_tests: + - tags-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-data-access-patterns-amplify_e2e_tests + - feature-flags-amplify_e2e_tests - analytics-amplify_e2e_tests: filters: *ref_2 requires: - publish_to_local_registry - - schema-predictions-amplify_e2e_tests + - schema-auth-3-amplify_e2e_tests diff --git a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts index 192c9e88cc0..e95f2519c36 100644 --- a/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts +++ b/packages/amplify-e2e-tests/src/schema-api-directives/tests/function-differentRegion.ts @@ -20,7 +20,7 @@ import { updateSchemaInTestProject, testQueries } from '../common'; import { randomizedFunctionName } from '../functionTester'; export async function runTest(projectDir: string, testModule: any) { - const functionRegion = process.env.CLI_REGION === 'us-west-2' ? 'us-east-1' : 'us-west-2'; + const functionRegion = process.env.CLI_REGION === 'us-west-2' ? 'us-east-2' : 'us-west-2'; const functionProjectDirPath = path.join(path.dirname(projectDir), path.basename(projectDir) + '-function'); try {