Skip to content

Commit

Permalink
test: add e2e tests for implicit IAM auth on schemas without models
Browse files Browse the repository at this point in the history
  • Loading branch information
palpatim committed Oct 21, 2024
1 parent dfd4446 commit a621272
Show file tree
Hide file tree
Showing 20 changed files with 821 additions and 92 deletions.
21 changes: 11 additions & 10 deletions codebuild_specs/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -755,61 +755,62 @@ batch:
CLI_REGION: ca-central-1
depend-on:
- publish_to_local_registry
- identifier: utils_ddb_iam_access_data_construct_custom_logic_amplify_table_5
- identifier: >-
ddb_iam_access_data_construct_custom_type_iam_access_custom_logic_amplify_table_5
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/utils.test.ts|src/__tests__/ddb-iam-access.test.ts|src/__tests__/data-construct.test.ts|src/__tests__/custom-logic.test.ts|src/__tests__/amplify-table-5.test.ts
src/__tests__/ddb-iam-access.test.ts|src/__tests__/data-construct.test.ts|src/__tests__/custom-type-iam-access.test.ts|src/__tests__/custom-logic.test.ts|src/__tests__/amplify-table-5.test.ts
CLI_REGION: eu-west-3
depend-on:
- publish_to_local_registry
- identifier: >-
add_resources_single_gsi_single_record_single_gsi_empty_table_single_gsi_1k_records_single_gsi_10k_records
add_resources_utils_single_gsi_single_record_single_gsi_empty_table_single_gsi_1k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/add-resources.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts
src/__tests__/add-resources.test.ts|src/__tests__/unit-tests/utils.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-1k-records.test.ts
CLI_REGION: ap-southeast-2
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_update_attr_single_record_replace_2_gsis_update_attr_empty_table_replace_2_gsis_update_attr_1k_records_replace_2
single_gsi_10k_records_replace_2_gsis_update_attr_single_record_replace_2_gsis_update_attr_empty_table_replace_2_gsis_update_at
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/single-gsi-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-update-attr-10k-records.test.ts
CLI_REGION: ca-central-1
depend-on:
- publish_to_local_registry
- identifier: >-
replace_2_gsis_empty_table_replace_2_gsis_1k_records_replace_2_gsis_10k_records_3_gsis_single_record_3_gsis_empty_table
replace_2_gsis_single_record_replace_2_gsis_empty_table_replace_2_gsis_1k_records_replace_2_gsis_10k_records_3_gsis_single_reco
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-single-record.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/replace-2-gsis-10k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-single-record.test.ts
CLI_REGION: eu-central-1
depend-on:
- publish_to_local_registry
- identifier: 3_gsis_1k_records_3_gsis_10k_records
- identifier: 3_gsis_empty_table_3_gsis_1k_records_3_gsis_10k_records
buildspec: codebuild_specs/run_cdk_tests.yml
env:
compute-type: BUILD_GENERAL1_LARGE
variables:
NODE_OPTIONS: '--max-old-space-size=14848'
TEST_SUITE: >-
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-empty-table.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-1k-records.test.ts|src/__tests__/deploy-velocity-temporarily-disabled/3-gsis-10k-records.test.ts
CLI_REGION: eu-north-1
depend-on:
- publish_to_local_registry
Expand Down
2 changes: 1 addition & 1 deletion dependency_licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6081,7 +6081,7 @@ MIT License

-----

The following software may be included in this product: @types/aws-lambda, @types/babel__core, @types/babel__generator, @types/babel__template, @types/babel__traverse, @types/fs-extra, @types/glob, @types/graceful-fs, @types/hjson, @types/http-cache-semantics, @types/ini, @types/istanbul-lib-coverage, @types/istanbul-lib-report, @types/istanbul-reports, @types/jest, @types/js-yaml, @types/json-schema, @types/lodash, @types/md5, @types/minimatch, @types/minimist, @types/mock-fs, @types/node, @types/normalize-package-data, @types/object-hash, @types/parse-json, @types/semver, @types/semver-utils, @types/stack-utils, @types/triple-beam, @types/uuid, @types/ws, @types/yargs, @types/yargs-parser, @types/zen-observable. A copy of the source code may be downloaded from https:/DefinitelyTyped/DefinitelyTyped.git (@types/aws-lambda), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__core), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__generator), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__template), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__traverse), https:/DefinitelyTyped/DefinitelyTyped.git (@types/fs-extra), https:/DefinitelyTyped/DefinitelyTyped.git (@types/glob), https:/DefinitelyTyped/DefinitelyTyped.git (@types/graceful-fs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/hjson), https:/DefinitelyTyped/DefinitelyTyped.git (@types/http-cache-semantics), https:/DefinitelyTyped/DefinitelyTyped.git (@types/ini), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-lib-coverage), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-lib-report), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-reports), https:/DefinitelyTyped/DefinitelyTyped.git (@types/jest), https:/DefinitelyTyped/DefinitelyTyped.git (@types/js-yaml), https:/DefinitelyTyped/DefinitelyTyped.git (@types/json-schema), https:/DefinitelyTyped/DefinitelyTyped.git (@types/lodash), https:/DefinitelyTyped/DefinitelyTyped.git (@types/md5), https:/DefinitelyTyped/DefinitelyTyped.git (@types/minimatch), https:/DefinitelyTyped/DefinitelyTyped.git (@types/minimist), https:/DefinitelyTyped/DefinitelyTyped.git (@types/mock-fs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/node), https:/DefinitelyTyped/DefinitelyTyped.git (@types/normalize-package-data), https:/DefinitelyTyped/DefinitelyTyped.git (@types/object-hash), https:/DefinitelyTyped/DefinitelyTyped.git (@types/parse-json), https:/DefinitelyTyped/DefinitelyTyped.git (@types/semver), https:/DefinitelyTyped/DefinitelyTyped.git (@types/semver-utils), https:/DefinitelyTyped/DefinitelyTyped.git (@types/stack-utils), https:/DefinitelyTyped/DefinitelyTyped.git (@types/triple-beam), https:/DefinitelyTyped/DefinitelyTyped.git (@types/uuid), https:/DefinitelyTyped/DefinitelyTyped.git (@types/ws), https:/DefinitelyTyped/DefinitelyTyped.git (@types/yargs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/yargs-parser), https:/DefinitelyTyped/DefinitelyTyped.git (@types/zen-observable). This software contains the following license and notice below:
The following software may be included in this product: @types/aws-lambda, @types/babel__core, @types/babel__generator, @types/babel__template, @types/babel__traverse, @types/fs-extra, @types/glob, @types/graceful-fs, @types/hjson, @types/http-cache-semantics, @types/ini, @types/istanbul-lib-coverage, @types/istanbul-lib-report, @types/istanbul-reports, @types/jest, @types/js-yaml, @types/json-schema, @types/lodash, @types/md5, @types/minimatch, @types/minimist, @types/mock-fs, @types/node, @types/node-fetch, @types/normalize-package-data, @types/object-hash, @types/parse-json, @types/semver, @types/semver-utils, @types/stack-utils, @types/triple-beam, @types/uuid, @types/ws, @types/yargs, @types/yargs-parser, @types/zen-observable. A copy of the source code may be downloaded from https:/DefinitelyTyped/DefinitelyTyped.git (@types/aws-lambda), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__core), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__generator), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__template), https:/DefinitelyTyped/DefinitelyTyped.git (@types/babel__traverse), https:/DefinitelyTyped/DefinitelyTyped.git (@types/fs-extra), https:/DefinitelyTyped/DefinitelyTyped.git (@types/glob), https:/DefinitelyTyped/DefinitelyTyped.git (@types/graceful-fs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/hjson), https:/DefinitelyTyped/DefinitelyTyped.git (@types/http-cache-semantics), https:/DefinitelyTyped/DefinitelyTyped.git (@types/ini), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-lib-coverage), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-lib-report), https:/DefinitelyTyped/DefinitelyTyped.git (@types/istanbul-reports), https:/DefinitelyTyped/DefinitelyTyped.git (@types/jest), https:/DefinitelyTyped/DefinitelyTyped.git (@types/js-yaml), https:/DefinitelyTyped/DefinitelyTyped.git (@types/json-schema), https:/DefinitelyTyped/DefinitelyTyped.git (@types/lodash), https:/DefinitelyTyped/DefinitelyTyped.git (@types/md5), https:/DefinitelyTyped/DefinitelyTyped.git (@types/minimatch), https:/DefinitelyTyped/DefinitelyTyped.git (@types/minimist), https:/DefinitelyTyped/DefinitelyTyped.git (@types/mock-fs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/node), https:/DefinitelyTyped/DefinitelyTyped.git (@types/node-fetch), https:/DefinitelyTyped/DefinitelyTyped.git (@types/normalize-package-data), https:/DefinitelyTyped/DefinitelyTyped.git (@types/object-hash), https:/DefinitelyTyped/DefinitelyTyped.git (@types/parse-json), https:/DefinitelyTyped/DefinitelyTyped.git (@types/semver), https:/DefinitelyTyped/DefinitelyTyped.git (@types/semver-utils), https:/DefinitelyTyped/DefinitelyTyped.git (@types/stack-utils), https:/DefinitelyTyped/DefinitelyTyped.git (@types/triple-beam), https:/DefinitelyTyped/DefinitelyTyped.git (@types/uuid), https:/DefinitelyTyped/DefinitelyTyped.git (@types/ws), https:/DefinitelyTyped/DefinitelyTyped.git (@types/yargs), https:/DefinitelyTyped/DefinitelyTyped.git (@types/yargs-parser), https:/DefinitelyTyped/DefinitelyTyped.git (@types/zen-observable). This software contains the following license and notice below:

MIT License

Expand Down
12 changes: 10 additions & 2 deletions packages/amplify-graphql-api-construct-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@
],
"private": true,
"scripts": {
"e2e": "jest --verbose --forceExit",
"build-tests": "tsc --build tsconfig.tests.json"
"e2e": "yarn test:e2e",
"build-tests": "tsc --build tsconfig.tests.json",
"test:e2e": "jest --verbose --forceExit",
"test": "jest --verbose --forceExit src/__tests__/unit-tests"
},
"dependencies": {
"@aws-amplify/auth-construct": "^1.0.0",
"@aws-amplify/core": "^2.1.0",
"@aws-amplify/graphql-api-construct": "1.15.1",
"@aws-cdk/aws-cognito-identitypool-alpha": "2.152.0-alpha.0",
"@aws-crypto/sha256-js": "^5.2.0",
"@aws-sdk/client-cognito-identity-provider": "3.624.0",
"@aws-sdk/client-lambda": "3.624.0",
"@aws-sdk/client-rds": "3.624.0",
"@aws-sdk/client-ssm": "3.624.0",
"@aws-sdk/client-sts": "3.624.0",
"@aws-sdk/credential-providers": "3.624.0",
"@faker-js/faker": "^8.2.0",
"@smithy/protocol-http": "^4.1.0",
"@smithy/signature-v4": "^4.1.0",
"@smithy/types": "^3.5.0",
"@types/node-fetch": "^2.6.11",
"amplify-category-api-e2e-core": "5.0.4",
"aws-amplify": "^4.2.8",
"aws-appsync": "^4.1.1",
Expand Down
Loading

0 comments on commit a621272

Please sign in to comment.