@aws-cdk-testing/cli-integ 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aws.js +6 -9
- package/lib/cli/query-github.js +2 -3
- package/lib/cli/run-suite.js +2 -3
- package/lib/cli/stage-distribution.js +4 -4
- package/lib/eventually.js +3 -3
- package/lib/files.js +2 -3
- package/lib/github.js +5 -6
- package/lib/integ-test.js +58 -3
- package/lib/package-sources/release-source.d.ts +1 -1
- package/lib/package-sources/release-source.js +2 -3
- package/lib/package-sources/repo-source.d.ts +1 -1
- package/lib/package-sources/repo-source.js +1 -1
- package/lib/package-sources/repo-tools/npm.js +4 -5
- package/lib/package-sources/subprocess.d.ts +1 -1
- package/lib/package-sources/subprocess.js +1 -1
- package/lib/process.js +5 -6
- package/lib/proxy.d.ts +1 -1
- package/lib/proxy.js +2 -2
- package/lib/resource-pool.js +5 -3
- package/lib/shell.d.ts +3 -3
- package/lib/shell.js +8 -12
- package/lib/staging/codeartifact.js +8 -11
- package/lib/staging/maven.d.ts +2 -2
- package/lib/staging/maven.js +3 -5
- package/lib/staging/npm.d.ts +2 -2
- package/lib/staging/npm.js +1 -1
- package/lib/staging/nuget.d.ts +2 -2
- package/lib/staging/nuget.js +1 -1
- package/lib/staging/parallel-shell.js +2 -2
- package/lib/staging/pypi.d.ts +2 -2
- package/lib/staging/pypi.js +1 -1
- package/lib/with-aws.d.ts +2 -2
- package/lib/with-aws.js +5 -4
- package/lib/with-cdk-app.d.ts +7 -5
- package/lib/with-cdk-app.js +28 -33
- package/lib/with-cli-lib.d.ts +4 -3
- package/lib/with-cli-lib.js +1 -1
- package/lib/with-packages.d.ts +1 -1
- package/lib/with-packages.js +1 -1
- package/lib/with-sam.d.ts +3 -3
- package/lib/with-sam.js +4 -7
- package/lib/with-temporary-directory.d.ts +1 -1
- package/lib/with-temporary-directory.js +1 -1
- package/lib/xpmutex.js +5 -3
- package/npm-shrinkwrap.json +8722 -0
- package/package.json +11 -7
- package/resources/cdk-apps/refactoring/cdk.json +7 -0
- package/resources/cdk-apps/refactoring/refactoring.js +18 -0
- package/test-reports/junit.xml +15 -0
- package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.js +11 -11
- package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.js +9 -9
- package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.js +4 -6
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-deploy.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.js +6 -7
- package/tests/cli-integ-tests/cdk-fast-deploy.integtest.js +4 -5
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.js +2 -2
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.js +6 -5
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.js +3 -4
- package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-import-interactive.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-lib-security-related-changes-without-a-cli-are-expected-to-fail-when-approval-is-required.integtest.js +1 -2
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.js +1 -1
- package/tests/cli-integ-tests/cdk-migrate/testcase.d.ts +1 -1
- package/tests/cli-integ-tests/cdk-migrate/testcase.js +4 -6
- package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-refactor-dry-run.integtest.d.ts +1 -0
- package/tests/cli-integ-tests/cdk-refactor-dry-run.integtest.js +41 -0
- package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.js +2 -3
- package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.js +5 -6
- package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.js +4 -4
- package/tests/cli-integ-tests/cdk-update-to-stack-in-rollback_complete-state-will-delete-stack-and-create-a-new-one.integtest.js +5 -6
- package/tests/cli-integ-tests/proxy.integtest.js +2 -3
- package/tests/init-go/init-go.integtest.js +2 -3
- package/tests/init-typescript-app/init-typescript-app.integtest.js +1 -1
- package/tests/tool-integrations/amplify.integtest.js +4 -4
- package/tests/tool-integrations/with-tool-context.d.ts +5 -5
- package/tests/tool-integrations/with-tool-context.js +1 -1
- package/.eslintrc.js +0 -9
- package/lib/aws.ts +0 -303
- package/lib/cli/query-github.ts +0 -56
- package/lib/cli/run-suite.ts +0 -153
- package/lib/cli/stage-distribution.ts +0 -262
- package/lib/cli/test-root.ts +0 -3
- package/lib/corking.ts +0 -33
- package/lib/eventually.ts +0 -42
- package/lib/files.ts +0 -80
- package/lib/github.ts +0 -43
- package/lib/index.ts +0 -13
- package/lib/integ-test.ts +0 -110
- package/lib/lists.ts +0 -9
- package/lib/memoize.ts +0 -14
- package/lib/npm.ts +0 -41
- package/lib/package-sources/release-source.ts +0 -82
- package/lib/package-sources/repo-source.ts +0 -112
- package/lib/package-sources/repo-tools/npm.ts +0 -48
- package/lib/package-sources/source.ts +0 -35
- package/lib/package-sources/subprocess.ts +0 -15
- package/lib/process.ts +0 -154
- package/lib/proxy.ts +0 -64
- package/lib/resource-pool.ts +0 -140
- package/lib/resources.ts +0 -4
- package/lib/shell.ts +0 -331
- package/lib/staging/codeartifact.ts +0 -387
- package/lib/staging/maven.ts +0 -95
- package/lib/staging/npm.ts +0 -62
- package/lib/staging/nuget.ts +0 -75
- package/lib/staging/parallel-shell.ts +0 -51
- package/lib/staging/pypi.ts +0 -50
- package/lib/staging/usage-dir.ts +0 -99
- package/lib/with-aws.ts +0 -111
- package/lib/with-cdk-app.ts +0 -847
- package/lib/with-cli-lib.ts +0 -150
- package/lib/with-packages.ts +0 -15
- package/lib/with-sam.ts +0 -295
- package/lib/with-temporary-directory.ts +0 -35
- package/lib/with-timeout.ts +0 -33
- package/lib/xpmutex.ts +0 -218
- package/resources/cli-regression-patches/v2.130.0/node_modules/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/nested-stack.js +0 -19
- package/resources/cli-regression-patches/v2.130.0/node_modules/@aws-cdk-testing/cli-integ/resources/cdk-apps/sam_cdk_integ_app/lib/test-stack.js +0 -134
- package/tests/cli-integ-tests/cdk---exclusively-selects-only-selected-stack.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.ts +0 -92
- package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.ts +0 -82
- package/tests/cli-integ-tests/cdk-automatic-ordering-with-concurrency.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-automatic-ordering.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and---no-rollback-is-removed-from-flags.integtest.ts +0 -40
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and-change-contains-a-replacement.integtest.ts +0 -40
- package/tests/cli-integ-tests/cdk-automatic-rollback-if-replacement-and---no-rollback-is-removed-from-flags.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-bootstrap-a-customized-template-vendor-will-not-overwrite-the-default-template.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-bootstrap-can-and-deploy-if-omitting-execution-policies.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.ts +0 -27
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-modern-synthesized-stack-even-if-bootstrap-stack-name-is-unknown.integtest.ts +0 -24
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-with-session-tags-on-the-deploy.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-without-execution-role-and-with-session-tags-on-deploy-role.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-can-dump-the-template.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.ts +0 -77
- package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.ts +0 -30
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-(with-slashes)-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-default-permissions-boundary-to-bootstrap.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.ts +0 -34
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap-(with-docker-image).integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-bootstrap-deploy-old-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -21
- package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.ts +0 -24
- package/tests/cli-integ-tests/cdk-bootstrap-upgrade-legacy-bootstrap-stack-to-new-bootstrap-stack-while-in-use.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-can-still-load-old-assemblies.integtest.ts +0 -57
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-on-multiple-stacks-exits-with-error-if-any-of-the-stacks-contains-a-diff.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-cdk-diff---fail-with-multiple-stack-exits-with-if-any-of-the-stacks-contains-a-diff.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-cdk-diff---quiet-does-not-print-there-were-no-differences-message-for-stacks-which-have-no-differences.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-changes-are-present.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-access-control-config.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-assignment.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-with-managed-policy.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-without-managed-policy.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-access-control-information.integtest.ts +0 -35
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-assignment-information.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-with-managed-policy-information.integtest.ts +0 -35
- package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-without-managed-policy-information.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-cdk-diff-doesnt-show-resource-metadata-changes.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-cdk-diff-shows-resource-metadata-changes-with---no-change-set.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-and-custom-toolkit-stack-name-and-qualifier-does-not-fail.integtest.ts +0 -39
- package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-does-not-fail.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-cdk-diff.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json---long.integtest.ts +0 -50
- package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json.integtest.ts +0 -95
- package/tests/cli-integ-tests/cdk-cdk-ls.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-cdk-notices-are-displayed-correctly.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-cdk-notices-with---unacknowledged.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-cdk-synth-add-the-metadata-properties-expected-by-sam.integtest.ts +0 -126
- package/tests/cli-integ-tests/cdk-cdk-synth-bundled-functions-as-expected.integtest.ts +0 -80
- package/tests/cli-integ-tests/cdk-cdk-synth.integtest.ts +0 -53
- package/tests/cli-integ-tests/cdk-ci-output-to-stderr.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-construct-with-builtin-lambda-function.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-context-in-stage-propagates-to-top.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-context-setting.integtest.ts +0 -33
- package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-deploy-all-concurrently.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-all.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.ts +0 -31
- package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.ts +0 -50
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-error.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-deploy-no-stacks-with---ignore-no-stacks.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.ts +0 -51
- package/tests/cli-integ-tests/cdk-deploy-stack-with-docker-asset.integtest.ts +0 -11
- package/tests/cli-integ-tests/cdk-deploy-stack-with-lambda-asset-to-object-lock-enabled-asset-bucket.integtest.ts +0 -42
- package/tests/cli-integ-tests/cdk-deploy-stack-without-resource.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-deploy-wildcard-with-outputs.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-deploy-with-method-direct-and-import-existing-resources-fails.integtest.ts +0 -17
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.ts +0 -45
- package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.ts +0 -37
- package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.ts +0 -33
- package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-deploy-with-role.integtest.ts +0 -119
- package/tests/cli-integ-tests/cdk-deploy-with-wildcard-and-parameters.integtest.ts +0 -22
- package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-deploy.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-doubly-nested-stack.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-enablediffnofail.integtest.ts +0 -44
- package/tests/cli-integ-tests/cdk-failed-deploy-does-not-hang.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-fast-deploy.integtest.ts +0 -41
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-ecr-images.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-s3-objects.integtest.ts +0 -51
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-ecr-images.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-s3-objects.integtest.ts +0 -52
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-ecr-images.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-s3-objects.integtest.ts +0 -63
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-ecr-images.integtest.ts +0 -55
- package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.ts +0 -63
- package/tests/cli-integ-tests/cdk-generating-and-loading-assembly.integtest.ts +0 -52
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-detects-failed-deployment-and-errors.integtest.ts +0 -29
- package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.ts +0 -45
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.ts +0 -36
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.ts +0 -41
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.ts +0 -53
- package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.ts +0 -43
- package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.ts +0 -59
- package/tests/cli-integ-tests/cdk-iam-diff.integtest.ts +0 -23
- package/tests/cli-integ-tests/cdk-import-interactive.integtest.ts +0 -57
- package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-lib-cli-lib-list.integtest.ts +0 -12
- package/tests/cli-integ-tests/cdk-lib-cli-lib-synth.integtest.ts +0 -27
- package/tests/cli-integ-tests/cdk-lib-security-related-changes-without-a-cli-are-expected-to-fail-when-approval-is-required.integtest.ts +0 -32
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-migrate/testcase.ts +0 -69
- package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.ts +0 -28
- package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.ts +0 -39
- package/tests/cli-integ-tests/cdk-sam-can-locally-test-the-synthesized-cdk-application.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-security-related-changes-without-a-cli-are-expected-to-fail.integtest.ts +0 -30
- package/tests/cli-integ-tests/cdk-skips-notice-refresh.integtest.ts +0 -26
- package/tests/cli-integ-tests/cdk-ssm-parameter-provider-error.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.ts +0 -59
- package/tests/cli-integ-tests/cdk-stage-with-bundled-lambda-function.integtest.ts +0 -13
- package/tests/cli-integ-tests/cdk-synth---quiet-can-be-specified-in-cdk.json.integtest.ts +0 -20
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-can-be-suppressed.integtest.ts +0 -15
- package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-leads-to-failure.integtest.ts +0 -18
- package/tests/cli-integ-tests/cdk-templates-on-disk-contain-metadata-resource.integtest.ts +0 -25
- package/tests/cli-integ-tests/cdk-termination-protection.integtest.ts +0 -19
- package/tests/cli-integ-tests/cdk-test-cdk-rollback---force.integtest.ts +0 -48
- package/tests/cli-integ-tests/cdk-test-cdk-rollback.integtest.ts +0 -38
- package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.ts +0 -56
- package/tests/cli-integ-tests/cdk-test-resource-import-with-construct-that-requires-bundling.integtest.ts +0 -74
- package/tests/cli-integ-tests/cdk-test-resource-import.integtest.ts +0 -64
- package/tests/cli-integ-tests/cdk-two-ways-of-showing-the-version.integtest.ts +0 -14
- package/tests/cli-integ-tests/cdk-update-to-stack-in-rollback_complete-state-will-delete-stack-and-create-a-new-one.integtest.ts +0 -47
- package/tests/cli-integ-tests/cdk-vpc-lookup.integtest.ts +0 -26
- package/tests/cli-integ-tests/proxy.integtest.ts +0 -168
- package/tests/init-csharp/init-csharp.integtest.ts +0 -15
- package/tests/init-fsharp/init-fsharp.integtest.ts +0 -15
- package/tests/init-go/init-go.integtest.ts +0 -28
- package/tests/init-java/init-java.integtest.ts +0 -14
- package/tests/init-javascript/init-javascript.integtest.ts +0 -58
- package/tests/init-python/init-python.integtest.ts +0 -20
- package/tests/init-typescript-app/init-typescript-app.integtest.ts +0 -67
- package/tests/init-typescript-lib/init-typescript-lib.integtest.ts +0 -13
- package/tests/tool-integrations/amplify.integtest.ts +0 -117
- package/tests/tool-integrations/with-tool-context.ts +0 -14
- package/tests/uberpackage/uberpackage.integtest.ts +0 -11
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import * as os from 'os';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
'generating and loading assembly',
|
|
10
|
-
withDefaultFixture(async (fixture) => {
|
|
11
|
-
const asmOutputDir = `${fixture.integTestDir}-cdk-integ-asm`;
|
|
12
|
-
await fixture.shell(['rm', '-rf', asmOutputDir]);
|
|
13
|
-
|
|
14
|
-
// Synthesize a Cloud Assembly tothe default directory (cdk.out) and a specific directory.
|
|
15
|
-
await fixture.cdk(['synth']);
|
|
16
|
-
await fixture.cdk(['synth', '--output', asmOutputDir]);
|
|
17
|
-
|
|
18
|
-
// cdk.out in the current directory and the indicated --output should be the same
|
|
19
|
-
await fixture.shell(['diff', 'cdk.out', asmOutputDir]);
|
|
20
|
-
|
|
21
|
-
// Check that we can 'ls' the synthesized asm.
|
|
22
|
-
// Change to some random directory to make sure we're not accidentally loading cdk.json
|
|
23
|
-
const list = await fixture.cdk(['--app', asmOutputDir, 'ls'], { cwd: os.tmpdir() });
|
|
24
|
-
// Same stacks we know are in the app
|
|
25
|
-
expect(list).toContain(`${fixture.stackNamePrefix}-lambda`);
|
|
26
|
-
expect(list).toContain(`${fixture.stackNamePrefix}-test-1`);
|
|
27
|
-
expect(list).toContain(`${fixture.stackNamePrefix}-test-2`);
|
|
28
|
-
|
|
29
|
-
// Check that we can use '.' and just synth ,the generated asm
|
|
30
|
-
const stackTemplate = await fixture.cdk(['--app', '.', 'synth', fixture.fullStackName('test-2')], {
|
|
31
|
-
cwd: asmOutputDir,
|
|
32
|
-
});
|
|
33
|
-
expect(stackTemplate).toContain('topic152D84A37');
|
|
34
|
-
|
|
35
|
-
// Deploy a Lambda from the copied asm
|
|
36
|
-
await fixture.cdkDeploy('lambda', { options: ['-a', '.'], cwd: asmOutputDir });
|
|
37
|
-
|
|
38
|
-
// Remove (rename) the original custom docker file that was used during synth.
|
|
39
|
-
// this verifies that the assemly has a copy of it and that the manifest uses
|
|
40
|
-
// relative paths to reference to it.
|
|
41
|
-
const customDockerFile = path.join(fixture.integTestDir, 'docker', 'Dockerfile.Custom');
|
|
42
|
-
await fs.rename(customDockerFile, `${customDockerFile}~`);
|
|
43
|
-
try {
|
|
44
|
-
// deploy a docker image with custom file without synth (uses assets)
|
|
45
|
-
await fixture.cdkDeploy('docker-with-custom-file', { options: ['-a', '.'], cwd: asmOutputDir });
|
|
46
|
-
} finally {
|
|
47
|
-
// Rename back to restore fixture to original state
|
|
48
|
-
await fs.rename(`${customDockerFile}~`, customDockerFile);
|
|
49
|
-
}
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
52
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { integTest, withExtendedTimeoutFixture } from '../../lib';
|
|
2
|
-
|
|
3
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
4
|
-
|
|
5
|
-
integTest(
|
|
6
|
-
'hotswap deployment for ecs service detects failed deployment and errors',
|
|
7
|
-
withExtendedTimeoutFixture(async (fixture) => {
|
|
8
|
-
// GIVEN
|
|
9
|
-
await fixture.cdkDeploy('ecs-hotswap', { verbose: true });
|
|
10
|
-
|
|
11
|
-
// WHEN
|
|
12
|
-
const deployOutput = await fixture.cdkDeploy('ecs-hotswap', {
|
|
13
|
-
options: ['--hotswap'],
|
|
14
|
-
modEnv: {
|
|
15
|
-
USE_INVALID_ECS_HOTSWAP_IMAGE: 'true',
|
|
16
|
-
},
|
|
17
|
-
allowErrExit: true,
|
|
18
|
-
verbose: true,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// THEN
|
|
22
|
-
const expectedSubstring = 'Resource is not in the expected state due to waiter status: TIMEOUT';
|
|
23
|
-
expect(deployOutput).toContain(expectedSubstring);
|
|
24
|
-
expect(deployOutput).toContain('Observed responses:');
|
|
25
|
-
expect(deployOutput).toContain('200: OK');
|
|
26
|
-
expect(deployOutput).not.toContain('hotswapped!');
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
|
-
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { DescribeServicesCommand } from '@aws-sdk/client-ecs';
|
|
3
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
4
|
-
|
|
5
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
6
|
-
|
|
7
|
-
integTest(
|
|
8
|
-
'hotswap deployment for ecs service waits for deployment to complete',
|
|
9
|
-
withDefaultFixture(async (fixture) => {
|
|
10
|
-
// GIVEN
|
|
11
|
-
const stackArn = await fixture.cdkDeploy('ecs-hotswap', {
|
|
12
|
-
captureStderr: false,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// WHEN
|
|
16
|
-
const deployOutput = await fixture.cdkDeploy('ecs-hotswap', {
|
|
17
|
-
options: ['--hotswap'],
|
|
18
|
-
modEnv: {
|
|
19
|
-
DYNAMIC_ECS_PROPERTY_VALUE: 'new value',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const describeStacksResponse = await fixture.aws.cloudFormation.send(
|
|
24
|
-
new DescribeStacksCommand({
|
|
25
|
-
StackName: stackArn,
|
|
26
|
-
}),
|
|
27
|
-
);
|
|
28
|
-
const clusterName = describeStacksResponse.Stacks?.[0].Outputs?.find((output) => output.OutputKey == 'ClusterName')
|
|
29
|
-
?.OutputValue!;
|
|
30
|
-
const serviceName = describeStacksResponse.Stacks?.[0].Outputs?.find((output) => output.OutputKey == 'ServiceName')
|
|
31
|
-
?.OutputValue!;
|
|
32
|
-
|
|
33
|
-
// THEN
|
|
34
|
-
|
|
35
|
-
const describeServicesResponse = await fixture.aws.ecs.send(
|
|
36
|
-
new DescribeServicesCommand({
|
|
37
|
-
cluster: clusterName,
|
|
38
|
-
services: [serviceName],
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
expect(describeServicesResponse.services?.[0].deployments).toHaveLength(1); // only one deployment present
|
|
42
|
-
expect(deployOutput).toMatch(/hotswapped!/);
|
|
43
|
-
}),
|
|
44
|
-
);
|
|
45
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest('hotswap deployment supports AppSync APIs with many functions',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
// GIVEN
|
|
9
|
-
const stackArn = await fixture.cdkDeploy('appsync-hotswap', {
|
|
10
|
-
captureStderr: false,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// WHEN
|
|
14
|
-
const deployOutput = await fixture.cdkDeploy('appsync-hotswap', {
|
|
15
|
-
options: ['--hotswap'],
|
|
16
|
-
captureStderr: true,
|
|
17
|
-
onlyStderr: true,
|
|
18
|
-
modEnv: {
|
|
19
|
-
DYNAMIC_APPSYNC_PROPERTY_VALUE: '$util.qr($ctx.stash.put("newTemplate", []))\n$util.toJson({})',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
24
|
-
new DescribeStacksCommand({
|
|
25
|
-
StackName: stackArn,
|
|
26
|
-
}),
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('CREATE_COMPLETE');
|
|
30
|
-
// assert all 50 functions were hotswapped
|
|
31
|
-
for (const i of Array(50).keys()) {
|
|
32
|
-
expect(deployOutput).toContain(`AWS::AppSync::FunctionConfiguration 'appsync_function${i}' hotswapped!`);
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
);
|
|
36
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest(
|
|
7
|
-
'hotswap deployment supports ecs service',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
// GIVEN
|
|
10
|
-
const stackArn = await fixture.cdkDeploy('ecs-hotswap', {
|
|
11
|
-
captureStderr: false,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// WHEN
|
|
15
|
-
const deployOutput = await fixture.cdkDeploy('ecs-hotswap', {
|
|
16
|
-
options: ['--hotswap'],
|
|
17
|
-
captureStderr: true,
|
|
18
|
-
onlyStderr: true,
|
|
19
|
-
modEnv: {
|
|
20
|
-
DYNAMIC_ECS_PROPERTY_VALUE: 'new value',
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
25
|
-
new DescribeStacksCommand({
|
|
26
|
-
StackName: stackArn,
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
|
-
const serviceName = response.Stacks?.[0].Outputs?.find((output) => output.OutputKey == 'ServiceName')?.OutputValue;
|
|
30
|
-
|
|
31
|
-
// THEN
|
|
32
|
-
|
|
33
|
-
// The deployment should not trigger a full deployment, thus the stack's status must remains
|
|
34
|
-
// "CREATE_COMPLETE"
|
|
35
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('CREATE_COMPLETE');
|
|
36
|
-
// The entire string fails locally due to formatting. Making this test less specific
|
|
37
|
-
expect(deployOutput).toMatch(/hotswapped!/);
|
|
38
|
-
expect(deployOutput).toContain(serviceName);
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
|
package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest(
|
|
7
|
-
'hotswap deployment supports Fn::ImportValue intrinsic',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
// GIVEN
|
|
10
|
-
try {
|
|
11
|
-
await fixture.cdkDeploy('export-value-stack');
|
|
12
|
-
const stackArn = await fixture.cdkDeploy('lambda-hotswap', {
|
|
13
|
-
captureStderr: false,
|
|
14
|
-
modEnv: {
|
|
15
|
-
DYNAMIC_LAMBDA_PROPERTY_VALUE: 'original value',
|
|
16
|
-
USE_IMPORT_VALUE_LAMBDA_PROPERTY: 'true',
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// WHEN
|
|
21
|
-
const deployOutput = await fixture.cdkDeploy('lambda-hotswap', {
|
|
22
|
-
options: ['--hotswap'],
|
|
23
|
-
captureStderr: true,
|
|
24
|
-
onlyStderr: true,
|
|
25
|
-
modEnv: {
|
|
26
|
-
DYNAMIC_LAMBDA_PROPERTY_VALUE: 'new value',
|
|
27
|
-
USE_IMPORT_VALUE_LAMBDA_PROPERTY: 'true',
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
32
|
-
new DescribeStacksCommand({
|
|
33
|
-
StackName: stackArn,
|
|
34
|
-
}),
|
|
35
|
-
);
|
|
36
|
-
const functionName = response.Stacks?.[0].Outputs?.[0].OutputValue;
|
|
37
|
-
|
|
38
|
-
// THEN
|
|
39
|
-
|
|
40
|
-
// The deployment should not trigger a full deployment, thus the stack's status must remains
|
|
41
|
-
// "CREATE_COMPLETE"
|
|
42
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('CREATE_COMPLETE');
|
|
43
|
-
// The entire string fails locally due to formatting. Making this test less specific
|
|
44
|
-
expect(deployOutput).toMatch(/hotswapped!/);
|
|
45
|
-
expect(deployOutput).toContain(functionName);
|
|
46
|
-
} finally {
|
|
47
|
-
// Ensure cleanup in reverse order due to use of import/export
|
|
48
|
-
await fixture.cdkDestroy('lambda-hotswap');
|
|
49
|
-
await fixture.cdkDestroy('export-value-stack');
|
|
50
|
-
}
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
53
|
-
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest(
|
|
7
|
-
"hotswap deployment supports Lambda function's description and environment variables",
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
// GIVEN
|
|
10
|
-
const stackArn = await fixture.cdkDeploy('lambda-hotswap', {
|
|
11
|
-
captureStderr: false,
|
|
12
|
-
modEnv: {
|
|
13
|
-
DYNAMIC_LAMBDA_PROPERTY_VALUE: 'original value',
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// WHEN
|
|
18
|
-
const deployOutput = await fixture.cdkDeploy('lambda-hotswap', {
|
|
19
|
-
options: ['--hotswap'],
|
|
20
|
-
captureStderr: true,
|
|
21
|
-
onlyStderr: true,
|
|
22
|
-
modEnv: {
|
|
23
|
-
DYNAMIC_LAMBDA_PROPERTY_VALUE: 'new value',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
28
|
-
new DescribeStacksCommand({
|
|
29
|
-
StackName: stackArn,
|
|
30
|
-
}),
|
|
31
|
-
);
|
|
32
|
-
const functionName = response.Stacks?.[0].Outputs?.[0].OutputValue;
|
|
33
|
-
|
|
34
|
-
// THEN
|
|
35
|
-
// The deployment should not trigger a full deployment, thus the stack's status must remains
|
|
36
|
-
// "CREATE_COMPLETE"
|
|
37
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('CREATE_COMPLETE');
|
|
38
|
-
// The entire string fails locally due to formatting. Making this test less specific
|
|
39
|
-
expect(deployOutput).toMatch(/hotswapped!/);
|
|
40
|
-
expect(deployOutput).toContain(functionName);
|
|
41
|
-
}),
|
|
42
|
-
);
|
|
43
|
-
|
package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
4
|
-
import { DescribeServicesCommand } from '@aws-sdk/client-ecs';
|
|
5
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
6
|
-
|
|
7
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
8
|
-
|
|
9
|
-
integTest('hotswap ECS deployment respects properties override', withDefaultFixture(async (fixture) => {
|
|
10
|
-
// Update the CDK context with the new ECS properties
|
|
11
|
-
let ecsMinimumHealthyPercent = 100;
|
|
12
|
-
let ecsMaximumHealthyPercent = 200;
|
|
13
|
-
let cdkJson = JSON.parse(await fs.readFile(path.join(fixture.integTestDir, 'cdk.json'), 'utf8'));
|
|
14
|
-
cdkJson = {
|
|
15
|
-
...cdkJson,
|
|
16
|
-
hotswap: {
|
|
17
|
-
ecs: {
|
|
18
|
-
minimumHealthyPercent: ecsMinimumHealthyPercent,
|
|
19
|
-
maximumHealthyPercent: ecsMaximumHealthyPercent,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
await fs.writeFile(path.join(fixture.integTestDir, 'cdk.json'), JSON.stringify(cdkJson));
|
|
25
|
-
|
|
26
|
-
// GIVEN
|
|
27
|
-
const stackArn = await fixture.cdkDeploy('ecs-hotswap', {
|
|
28
|
-
captureStderr: false,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// WHEN
|
|
32
|
-
await fixture.cdkDeploy('ecs-hotswap', {
|
|
33
|
-
options: [
|
|
34
|
-
'--hotswap',
|
|
35
|
-
],
|
|
36
|
-
modEnv: {
|
|
37
|
-
DYNAMIC_ECS_PROPERTY_VALUE: 'new value',
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const describeStacksResponse = await fixture.aws.cloudFormation.send(
|
|
42
|
-
new DescribeStacksCommand({
|
|
43
|
-
StackName: stackArn,
|
|
44
|
-
}),
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const clusterName = describeStacksResponse.Stacks?.[0].Outputs?.find(output => output.OutputKey == 'ClusterName')?.OutputValue!;
|
|
48
|
-
const serviceName = describeStacksResponse.Stacks?.[0].Outputs?.find(output => output.OutputKey == 'ServiceName')?.OutputValue!;
|
|
49
|
-
|
|
50
|
-
// THEN
|
|
51
|
-
const describeServicesResponse = await fixture.aws.ecs.send(
|
|
52
|
-
new DescribeServicesCommand({
|
|
53
|
-
cluster: clusterName,
|
|
54
|
-
services: [serviceName],
|
|
55
|
-
}),
|
|
56
|
-
);
|
|
57
|
-
expect(describeServicesResponse.services?.[0].deploymentConfiguration?.minimumHealthyPercent).toEqual(ecsMinimumHealthyPercent);
|
|
58
|
-
expect(describeServicesResponse.services?.[0].deploymentConfiguration?.maximumPercent).toEqual(ecsMaximumHealthyPercent);
|
|
59
|
-
}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
2
|
-
|
|
3
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
4
|
-
|
|
5
|
-
integTest(
|
|
6
|
-
'IAM diff',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
const output = await fixture.cdk(['diff', fixture.fullStackName('iam-test')]);
|
|
9
|
-
|
|
10
|
-
// Roughly check for a table like this:
|
|
11
|
-
//
|
|
12
|
-
// ┌───┬─────────────────┬────────┬────────────────┬────────────────────────────-──┬───────────┐
|
|
13
|
-
// │ │ Resource │ Effect │ Action │ Principal │ Condition │
|
|
14
|
-
// ├───┼─────────────────┼────────┼────────────────┼───────────────────────────────┼───────────┤
|
|
15
|
-
// │ + │ ${SomeRole.Arn} │ Allow │ sts:AssumeRole │ Service:ec2.amazonaws.com │ │
|
|
16
|
-
// └───┴─────────────────┴────────┴────────────────┴───────────────────────────────┴───────────┘
|
|
17
|
-
|
|
18
|
-
expect(output).toContain('${SomeRole.Arn}');
|
|
19
|
-
expect(output).toContain('sts:AssumeRole');
|
|
20
|
-
expect(output).toContain('ec2.amazonaws.com');
|
|
21
|
-
}),
|
|
22
|
-
);
|
|
23
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { DescribeStackResourcesCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
3
|
-
import { integTest, withDefaultFixture } from '../../lib';
|
|
4
|
-
|
|
5
|
-
integTest('cdk import prompts the user for sns topic arns', withDefaultFixture(async (fixture) => {
|
|
6
|
-
|
|
7
|
-
const topicName = (logicalId: string) => `${logicalId}-${fixture.randomString}`;
|
|
8
|
-
const topicArn = async (name: string) => `arn:aws:sns:${fixture.aws.region}:${ await fixture.aws.account()}:${name}`
|
|
9
|
-
|
|
10
|
-
const topic1Name = topicName('Topic1');
|
|
11
|
-
const topic2Name = topicName('Topic2');
|
|
12
|
-
|
|
13
|
-
const topic1Arn = await topicArn(topic1Name);
|
|
14
|
-
const topic2Arn = await topicArn(topic2Name);
|
|
15
|
-
|
|
16
|
-
fixture.log(`Creating topic ${topic1Name}`);
|
|
17
|
-
await fixture.aws.sns.send(new CreateTopicCommand({ Name: topic1Name }))
|
|
18
|
-
fixture.log(`Creating topic ${topic2Name}`);
|
|
19
|
-
await fixture.aws.sns.send(new CreateTopicCommand({ Name: topic2Name }))
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
|
|
23
|
-
const stackName = 'two-sns-topics';
|
|
24
|
-
const fullStackName = fixture.fullStackName(stackName);
|
|
25
|
-
|
|
26
|
-
fixture.log(`Importing topics to stack ${fullStackName}`);
|
|
27
|
-
await fixture.cdk(['import', fullStackName], {
|
|
28
|
-
interact: [
|
|
29
|
-
{
|
|
30
|
-
prompt: /Topic1.*\(empty to skip\):/,
|
|
31
|
-
input: topic1Arn,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
prompt: /Topic2.*\(empty to skip\):/,
|
|
35
|
-
input: topic2Arn,
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
modEnv: {
|
|
39
|
-
// disable coloring because it messes up prompt matching.
|
|
40
|
-
FORCE_COLOR: '0'
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// assert the stack now has the two topics
|
|
45
|
-
const stackResources = await fixture.aws.cloudFormation.send(new DescribeStackResourcesCommand({ StackName: fullStackName }))
|
|
46
|
-
const stackTopicArns = new Set(stackResources.StackResources?.filter(r => r.ResourceType === 'AWS::SNS::Topic').map(r => r.PhysicalResourceId) ?? []);
|
|
47
|
-
|
|
48
|
-
expect(stackTopicArns).toEqual(new Set([topic1Arn, topic2Arn]))
|
|
49
|
-
|
|
50
|
-
} finally {
|
|
51
|
-
fixture.log(`Deleting topic ${topic1Name}`);
|
|
52
|
-
await fixture.aws.sns.send(new DeleteTopicCommand({ TopicArn: topic1Arn }))
|
|
53
|
-
fixture.log(`Deleting topic ${topic2Name}`);
|
|
54
|
-
await fixture.aws.sns.send(new DeleteTopicCommand({ TopicArn: topic2Arn }))
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
}));
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { DescribeStackResourcesCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withCliLibFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest(
|
|
7
|
-
'cli-lib deploy',
|
|
8
|
-
withCliLibFixture(async (fixture) => {
|
|
9
|
-
const stackName = fixture.fullStackName('simple-1');
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
// deploy the stack
|
|
13
|
-
await fixture.cdk(['deploy', stackName], {
|
|
14
|
-
neverRequireApproval: true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// verify the number of resources in the stack
|
|
18
|
-
const expectedStack = await fixture.aws.cloudFormation.send(
|
|
19
|
-
new DescribeStackResourcesCommand({
|
|
20
|
-
StackName: stackName,
|
|
21
|
-
}),
|
|
22
|
-
);
|
|
23
|
-
expect(expectedStack.StackResources?.length).toEqual(3);
|
|
24
|
-
} finally {
|
|
25
|
-
// delete the stack
|
|
26
|
-
await fixture.cdk(['destroy', stackName], {
|
|
27
|
-
captureStderr: false,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
31
|
-
);
|
|
32
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { integTest, withCliLibFixture } from '../../lib';
|
|
2
|
-
|
|
3
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
4
|
-
|
|
5
|
-
integTest(
|
|
6
|
-
'cli-lib list',
|
|
7
|
-
withCliLibFixture(async (fixture) => {
|
|
8
|
-
const listing = await fixture.cdk(['list'], { captureStderr: false });
|
|
9
|
-
expect(listing).toContain(fixture.fullStackName('simple-1'));
|
|
10
|
-
}),
|
|
11
|
-
);
|
|
12
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { integTest, withCliLibFixture } from '../../lib';
|
|
2
|
-
|
|
3
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
4
|
-
|
|
5
|
-
integTest(
|
|
6
|
-
'cli-lib synth',
|
|
7
|
-
withCliLibFixture(async (fixture) => {
|
|
8
|
-
await fixture.cdk(['synth', fixture.fullStackName('simple-1')]);
|
|
9
|
-
expect(fixture.template('simple-1')).toEqual(
|
|
10
|
-
expect.objectContaining({
|
|
11
|
-
// Checking for a small subset is enough as proof that synth worked
|
|
12
|
-
Resources: expect.objectContaining({
|
|
13
|
-
queue276F7297: expect.objectContaining({
|
|
14
|
-
Type: 'AWS::SQS::Queue',
|
|
15
|
-
Properties: {
|
|
16
|
-
VisibilityTimeout: 300,
|
|
17
|
-
},
|
|
18
|
-
Metadata: {
|
|
19
|
-
'aws:cdk:path': `${fixture.stackNamePrefix}-simple-1/queue/Resource`,
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
}),
|
|
23
|
-
}),
|
|
24
|
-
);
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { integTest, withCliLibFixture } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest(
|
|
7
|
-
'security related changes without a CLI are expected to fail when approval is required',
|
|
8
|
-
withCliLibFixture(async (fixture) => {
|
|
9
|
-
const stdErr = await fixture.cdk(['deploy', fixture.fullStackName('simple-1')], {
|
|
10
|
-
onlyStderr: true,
|
|
11
|
-
captureStderr: true,
|
|
12
|
-
allowErrExit: true,
|
|
13
|
-
neverRequireApproval: false,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
expect(stdErr).toContain(
|
|
17
|
-
'This deployment will make potentially sensitive changes according to your current security approval level',
|
|
18
|
-
);
|
|
19
|
-
expect(stdErr).toContain(
|
|
20
|
-
'"--require-approval" is enabled and stack includes security-sensitive updates',
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
// Ensure stack was not deployed
|
|
24
|
-
await expect(
|
|
25
|
-
fixture.aws.cloudFormation.send(
|
|
26
|
-
new DescribeStacksCommand({
|
|
27
|
-
StackName: fixture.fullStackName('simple-1'),
|
|
28
|
-
}),
|
|
29
|
-
),
|
|
30
|
-
).rejects.toThrow('does not exist');
|
|
31
|
-
}),
|
|
32
|
-
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { fromStackCreatesDeployableApp } from "./testcase";
|
|
2
|
-
import { integTest, withExtendedTimeoutFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'csharp';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate --from-stack creates deployable ${language} app`,
|
|
10
|
-
withExtendedTimeoutFixture(async (fixture) => {
|
|
11
|
-
await fromStackCreatesDeployableApp(fixture, language);
|
|
12
|
-
}),
|
|
13
|
-
);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { fromStackCreatesDeployableApp } from "./testcase";
|
|
2
|
-
import { integTest, withExtendedTimeoutFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'java';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
integTest(
|
|
10
|
-
`cdk migrate --from-stack creates deployable ${language} app`,
|
|
11
|
-
withExtendedTimeoutFixture(async (fixture) => {
|
|
12
|
-
await fromStackCreatesDeployableApp(fixture, language);
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { fromStackCreatesDeployableApp } from "./testcase";
|
|
2
|
-
import { integTest, withExtendedTimeoutFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'python';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate --from-stack creates deployable ${language} app`,
|
|
10
|
-
withExtendedTimeoutFixture(async (fixture) => {
|
|
11
|
-
await fromStackCreatesDeployableApp(fixture, language);
|
|
12
|
-
}),
|
|
13
|
-
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { fromStackCreatesDeployableApp } from "./testcase";
|
|
2
|
-
import { integTest, withExtendedTimeoutFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'typescript';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate --from-stack creates deployable ${language} app`,
|
|
10
|
-
withExtendedTimeoutFixture(async (fixture) => {
|
|
11
|
-
await fromStackCreatesDeployableApp(fixture, language);
|
|
12
|
-
}),
|
|
13
|
-
);
|
package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { deploysSuccessfully } from './testcase';
|
|
2
|
-
import { integTest, withCDKMigrateFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'csharp';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate ${language} deploys successfully`,
|
|
10
|
-
withCDKMigrateFixture(language, async (fixture) => {
|
|
11
|
-
|
|
12
|
-
await deploysSuccessfully(fixture, language);
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
);
|
package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { deploysSuccessfully } from './testcase';
|
|
2
|
-
import { integTest, withCDKMigrateFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'java';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate ${language} deploys successfully`,
|
|
10
|
-
withCDKMigrateFixture(language, async (fixture) => {
|
|
11
|
-
|
|
12
|
-
await deploysSuccessfully(fixture, language);
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
);
|
package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { deploysSuccessfully } from './testcase';
|
|
2
|
-
import { integTest, withCDKMigrateFixture } from "../../../lib";
|
|
3
|
-
|
|
4
|
-
const language = 'python';
|
|
5
|
-
|
|
6
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
7
|
-
|
|
8
|
-
integTest(
|
|
9
|
-
`cdk migrate ${language} deploys successfully`,
|
|
10
|
-
withCDKMigrateFixture(language, async (fixture) => {
|
|
11
|
-
|
|
12
|
-
await deploysSuccessfully(fixture, language);
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
);
|