@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,50 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
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('deploy deletes ALL notification arns when empty array is passed', withDefaultFixture(async (fixture) => {
|
|
8
|
-
const topicName = `${fixture.stackNamePrefix}-topic`;
|
|
9
|
-
|
|
10
|
-
const response = await fixture.aws.sns.send(new CreateTopicCommand({ Name: topicName }));
|
|
11
|
-
const topicArn = response.TopicArn!;
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
await fixture.cdkDeploy('notification-arns', {
|
|
15
|
-
modEnv: {
|
|
16
|
-
INTEG_NOTIFICATION_ARNS: topicArn,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// make sure the arn was added
|
|
21
|
-
let describeResponse = await fixture.aws.cloudFormation.send(
|
|
22
|
-
new DescribeStacksCommand({
|
|
23
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
24
|
-
}),
|
|
25
|
-
);
|
|
26
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([topicArn]);
|
|
27
|
-
|
|
28
|
-
// deploy again with empty array
|
|
29
|
-
await fixture.cdkDeploy('notification-arns', {
|
|
30
|
-
modEnv: {
|
|
31
|
-
INTEG_NOTIFICATION_ARNS: '',
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// make sure the arn was deleted
|
|
36
|
-
describeResponse = await fixture.aws.cloudFormation.send(
|
|
37
|
-
new DescribeStacksCommand({
|
|
38
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([]);
|
|
42
|
-
} finally {
|
|
43
|
-
await fixture.aws.sns.send(
|
|
44
|
-
new DeleteTopicCommand({
|
|
45
|
-
TopicArn: topicArn,
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}));
|
|
50
|
-
|
|
@@ -1,18 +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
|
-
'deploy no stacks error',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
// empty array for stack names
|
|
9
|
-
await expect(
|
|
10
|
-
fixture.cdkDeploy([], {
|
|
11
|
-
modEnv: {
|
|
12
|
-
INTEG_STACK_SET: 'stage-with-no-stacks',
|
|
13
|
-
},
|
|
14
|
-
}),
|
|
15
|
-
).rejects.toThrow('exited with error');
|
|
16
|
-
}),
|
|
17
|
-
);
|
|
18
|
-
|
|
@@ -1,17 +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
|
-
'deploy no stacks with --ignore-no-stacks',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
// empty array for stack names
|
|
9
|
-
await fixture.cdkDeploy([], {
|
|
10
|
-
options: ['--ignore-no-stacks'],
|
|
11
|
-
modEnv: {
|
|
12
|
-
INTEG_STACK_SET: 'stage-with-no-stacks',
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
}),
|
|
16
|
-
);
|
|
17
|
-
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand, UpdateStackCommand, waitUntilStackUpdateComplete } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
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('deploy preserves existing notification arns when not specified', withDefaultFixture(async (fixture) => {
|
|
8
|
-
const topicName = `${fixture.stackNamePrefix}-topic`;
|
|
9
|
-
|
|
10
|
-
const response = await fixture.aws.sns.send(new CreateTopicCommand({ Name: topicName }));
|
|
11
|
-
const topicArn = response.TopicArn!;
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
await fixture.cdkDeploy('notification-arns');
|
|
15
|
-
|
|
16
|
-
// add notification arns externally to cdk
|
|
17
|
-
await fixture.aws.cloudFormation.send(
|
|
18
|
-
new UpdateStackCommand({
|
|
19
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
20
|
-
UsePreviousTemplate: true,
|
|
21
|
-
NotificationARNs: [topicArn],
|
|
22
|
-
}),
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
await waitUntilStackUpdateComplete(
|
|
26
|
-
{
|
|
27
|
-
client: fixture.aws.cloudFormation,
|
|
28
|
-
maxWaitTime: 600,
|
|
29
|
-
},
|
|
30
|
-
{ StackName: fixture.fullStackName('notification-arns') },
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
// deploy again
|
|
34
|
-
await fixture.cdkDeploy('notification-arns');
|
|
35
|
-
|
|
36
|
-
// make sure the notification arn is preserved
|
|
37
|
-
const describeResponse = await fixture.aws.cloudFormation.send(
|
|
38
|
-
new DescribeStacksCommand({
|
|
39
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
40
|
-
}),
|
|
41
|
-
);
|
|
42
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([topicArn]);
|
|
43
|
-
} finally {
|
|
44
|
-
await fixture.aws.sns.send(
|
|
45
|
-
new DeleteTopicCommand({
|
|
46
|
-
TopicArn: topicArn,
|
|
47
|
-
}),
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
}));
|
|
51
|
-
|
|
@@ -1,11 +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
|
-
'deploy stack with docker asset',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
await fixture.cdkDeploy('docker');
|
|
9
|
-
}),
|
|
10
|
-
);
|
|
11
|
-
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PutObjectLockConfigurationCommand } from '@aws-sdk/client-s3';
|
|
2
|
-
import { integTest, withoutBootstrap } from '../../lib';
|
|
3
|
-
|
|
4
|
-
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
|
|
5
|
-
|
|
6
|
-
integTest('deploy stack with Lambda Asset to Object Lock-enabled asset bucket', withoutBootstrap(async (fixture) => {
|
|
7
|
-
// Bootstrapping with custom toolkit stack name and qualifier
|
|
8
|
-
const qualifier = fixture.qualifier;
|
|
9
|
-
const toolkitStackName = fixture.bootstrapStackName;
|
|
10
|
-
await fixture.cdkBootstrapModern({
|
|
11
|
-
verbose: true,
|
|
12
|
-
toolkitStackName: toolkitStackName,
|
|
13
|
-
qualifier: qualifier,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const bucketName = `cdk-${qualifier}-assets-${await fixture.aws.account()}-${fixture.aws.region}`;
|
|
17
|
-
await fixture.aws.s3.send(new PutObjectLockConfigurationCommand({
|
|
18
|
-
Bucket: bucketName,
|
|
19
|
-
ObjectLockConfiguration: {
|
|
20
|
-
ObjectLockEnabled: 'Enabled',
|
|
21
|
-
Rule: {
|
|
22
|
-
DefaultRetention: {
|
|
23
|
-
Days: 1,
|
|
24
|
-
Mode: 'GOVERNANCE',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
// Deploy a stack that definitely contains a file asset
|
|
31
|
-
await fixture.cdkDeploy('lambda', {
|
|
32
|
-
options: [
|
|
33
|
-
'--toolkit-stack-name', toolkitStackName,
|
|
34
|
-
'--context', `@aws-cdk/core:bootstrapQualifier=${qualifier}`,
|
|
35
|
-
],
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// THEN - should not fail. Now clean the bucket with governance bypass: a regular delete
|
|
39
|
-
// operation will fail.
|
|
40
|
-
await fixture.aws.emptyBucket(bucketName, { bypassGovernance: true });
|
|
41
|
-
}));
|
|
42
|
-
|
|
@@ -1,32 +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
|
-
'deploy stack without resource',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
// Deploy the stack without resources
|
|
10
|
-
await fixture.cdkDeploy('conditional-resource', { modEnv: { NO_RESOURCE: 'TRUE' } });
|
|
11
|
-
|
|
12
|
-
// This should have succeeded but not deployed the stack.
|
|
13
|
-
await expect(
|
|
14
|
-
fixture.aws.cloudFormation.send(
|
|
15
|
-
new DescribeStacksCommand({ StackName: fixture.fullStackName('conditional-resource') }),
|
|
16
|
-
),
|
|
17
|
-
).rejects.toThrow('conditional-resource does not exist');
|
|
18
|
-
|
|
19
|
-
// Deploy the stack with resources
|
|
20
|
-
await fixture.cdkDeploy('conditional-resource');
|
|
21
|
-
|
|
22
|
-
// Then again WITHOUT resources (this should destroy the stack)
|
|
23
|
-
await fixture.cdkDeploy('conditional-resource', { modEnv: { NO_RESOURCE: 'TRUE' } });
|
|
24
|
-
|
|
25
|
-
await expect(
|
|
26
|
-
fixture.aws.cloudFormation.send(
|
|
27
|
-
new DescribeStacksCommand({ StackName: fixture.fullStackName('conditional-resource') }),
|
|
28
|
-
),
|
|
29
|
-
).rejects.toThrow('conditional-resource does not exist');
|
|
30
|
-
}),
|
|
31
|
-
);
|
|
32
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
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
|
-
'deploy wildcard with outputs',
|
|
9
|
-
withDefaultFixture(async (fixture) => {
|
|
10
|
-
const outputsFile = path.join(fixture.integTestDir, 'outputs', 'outputs.json');
|
|
11
|
-
await fs.mkdir(path.dirname(outputsFile), { recursive: true });
|
|
12
|
-
|
|
13
|
-
await fixture.cdkDeploy(['outputs-test-*'], {
|
|
14
|
-
options: ['--outputs-file', outputsFile],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const outputs = JSON.parse((await fs.readFile(outputsFile, { encoding: 'utf-8' })).toString());
|
|
18
|
-
expect(outputs).toEqual({
|
|
19
|
-
[`${fixture.stackNamePrefix}-outputs-test-1`]: {
|
|
20
|
-
TopicName: `${fixture.stackNamePrefix}-outputs-test-1MyTopic`,
|
|
21
|
-
},
|
|
22
|
-
[`${fixture.stackNamePrefix}-outputs-test-2`]: {
|
|
23
|
-
TopicName: `${fixture.stackNamePrefix}-outputs-test-2MyOtherTopic`,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
}),
|
|
27
|
-
);
|
|
28
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand, ListChangeSetsCommand } 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('deploy with import-existing-resources true', withDefaultFixture(async (fixture) => {
|
|
7
|
-
const stackArn = await fixture.cdkDeploy('test-2', {
|
|
8
|
-
options: ['--no-execute', '--import-existing-resources'],
|
|
9
|
-
captureStderr: false,
|
|
10
|
-
});
|
|
11
|
-
// verify that we only deployed a single stack (there's a single ARN in the output)
|
|
12
|
-
expect(stackArn.split('\n').length).toEqual(1);
|
|
13
|
-
|
|
14
|
-
const response = await fixture.aws.cloudFormation.send(new DescribeStacksCommand({
|
|
15
|
-
StackName: stackArn,
|
|
16
|
-
}));
|
|
17
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('REVIEW_IN_PROGRESS');
|
|
18
|
-
|
|
19
|
-
// verify a change set was successfully created
|
|
20
|
-
// Here, we do not test whether a resource is actually imported, because that is a CloudFormation feature, not a CDK feature.
|
|
21
|
-
const changeSetResponse = await fixture.aws.cloudFormation.send(new ListChangeSetsCommand({
|
|
22
|
-
StackName: stackArn,
|
|
23
|
-
}));
|
|
24
|
-
const changeSets = changeSetResponse.Summaries || [];
|
|
25
|
-
expect(changeSets.length).toEqual(1);
|
|
26
|
-
expect(changeSets[0].Status).toEqual('CREATE_COMPLETE');
|
|
27
|
-
expect(changeSets[0].ImportExistingResources).toEqual(true);
|
|
28
|
-
}));
|
|
29
|
-
|
|
@@ -1,17 +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('deploy with method=direct and import-existing-resources fails', withDefaultFixture(async (fixture) => {
|
|
7
|
-
const stackName = 'iam-test';
|
|
8
|
-
await expect(fixture.cdkDeploy(stackName, {
|
|
9
|
-
options: ['--import-existing-resources', '--method=direct'],
|
|
10
|
-
})).rejects.toThrow('exited with error');
|
|
11
|
-
|
|
12
|
-
// Ensure stack was not deployed
|
|
13
|
-
await expect(fixture.aws.cloudFormation.send(new DescribeStacksCommand({
|
|
14
|
-
StackName: fixture.fullStackName(stackName),
|
|
15
|
-
}))).rejects.toThrow('does not exist');
|
|
16
|
-
}));
|
|
17
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
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
|
-
'deploy with notification ARN as flag',
|
|
9
|
-
withDefaultFixture(async (fixture) => {
|
|
10
|
-
const topicName = `${fixture.stackNamePrefix}-test-topic-flag`;
|
|
11
|
-
|
|
12
|
-
const response = await fixture.aws.sns.send(new CreateTopicCommand({ Name: topicName }));
|
|
13
|
-
const topicArn = response.TopicArn!;
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
await fixture.cdkDeploy('notification-arns', {
|
|
17
|
-
options: ['--notification-arns', topicArn],
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// verify that the stack we deployed has our notification ARN
|
|
21
|
-
const describeResponse = await fixture.aws.cloudFormation.send(
|
|
22
|
-
new DescribeStacksCommand({
|
|
23
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
24
|
-
}),
|
|
25
|
-
);
|
|
26
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([topicArn]);
|
|
27
|
-
} finally {
|
|
28
|
-
await fixture.aws.sns.send(
|
|
29
|
-
new DeleteTopicCommand({
|
|
30
|
-
TopicArn: topicArn,
|
|
31
|
-
}),
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
);
|
|
36
|
-
|
package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
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('deploy with notification ARN as prop and flag', withDefaultFixture(async (fixture) => {
|
|
8
|
-
const topic1Name = `${fixture.stackNamePrefix}-topic1`;
|
|
9
|
-
const topic2Name = `${fixture.stackNamePrefix}-topic1`;
|
|
10
|
-
|
|
11
|
-
const topic1Arn = (await fixture.aws.sns.send(new CreateTopicCommand({ Name: topic1Name }))).TopicArn!;
|
|
12
|
-
const topic2Arn = (await fixture.aws.sns.send(new CreateTopicCommand({ Name: topic2Name }))).TopicArn!;
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
await fixture.cdkDeploy('notification-arns', {
|
|
16
|
-
modEnv: {
|
|
17
|
-
INTEG_NOTIFICATION_ARNS: topic1Arn,
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
options: ['--notification-arns', topic2Arn],
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// verify that the stack we deployed has our notification ARN
|
|
24
|
-
const describeResponse = await fixture.aws.cloudFormation.send(
|
|
25
|
-
new DescribeStacksCommand({
|
|
26
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([topic1Arn, topic2Arn]);
|
|
30
|
-
} finally {
|
|
31
|
-
await fixture.aws.sns.send(
|
|
32
|
-
new DeleteTopicCommand({
|
|
33
|
-
TopicArn: topic1Arn,
|
|
34
|
-
}),
|
|
35
|
-
);
|
|
36
|
-
await fixture.aws.sns.send(
|
|
37
|
-
new DeleteTopicCommand({
|
|
38
|
-
TopicArn: topic2Arn,
|
|
39
|
-
}),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
// NOTE: this doesn't currently work with modern-style synthesis, as the bootstrap
|
|
45
|
-
// role by default will not have permission to iam:PassRole the created role.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
|
|
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('deploy with notification ARN as prop', withDefaultFixture(async (fixture) => {
|
|
8
|
-
const topicName = `${fixture.stackNamePrefix}-test-topic-prop`;
|
|
9
|
-
|
|
10
|
-
const response = await fixture.aws.sns.send(new CreateTopicCommand({ Name: topicName }));
|
|
11
|
-
const topicArn = response.TopicArn!;
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
await fixture.cdkDeploy('notification-arns', {
|
|
15
|
-
modEnv: {
|
|
16
|
-
INTEG_NOTIFICATION_ARNS: topicArn,
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
// verify that the stack we deployed has our notification ARN
|
|
22
|
-
const describeResponse = await fixture.aws.cloudFormation.send(
|
|
23
|
-
new DescribeStacksCommand({
|
|
24
|
-
StackName: fixture.fullStackName('notification-arns'),
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
expect(describeResponse.Stacks?.[0].NotificationARNs).toEqual([topicArn]);
|
|
28
|
-
} finally {
|
|
29
|
-
await fixture.aws.sns.send(
|
|
30
|
-
new DeleteTopicCommand({
|
|
31
|
-
TopicArn: topicArn,
|
|
32
|
-
}),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
// https://github.com/aws/aws-cdk/issues/32153
|
|
@@ -1,33 +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
|
-
'deploy with parameters multi',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
const paramVal1 = `${fixture.stackNamePrefix}bazinga`;
|
|
10
|
-
const paramVal2 = `${fixture.stackNamePrefix}=jagshemash`;
|
|
11
|
-
|
|
12
|
-
const stackArn = await fixture.cdkDeploy('param-test-3', {
|
|
13
|
-
options: ['--parameters', `DisplayNameParam=${paramVal1}`, '--parameters', `OtherDisplayNameParam=${paramVal2}`],
|
|
14
|
-
captureStderr: false,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
18
|
-
new DescribeStacksCommand({
|
|
19
|
-
StackName: stackArn,
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
expect(response.Stacks?.[0].Parameters).toContainEqual({
|
|
24
|
-
ParameterKey: 'DisplayNameParam',
|
|
25
|
-
ParameterValue: paramVal1,
|
|
26
|
-
});
|
|
27
|
-
expect(response.Stacks?.[0].Parameters).toContainEqual({
|
|
28
|
-
ParameterKey: 'OtherDisplayNameParam',
|
|
29
|
-
ParameterValue: paramVal2,
|
|
30
|
-
});
|
|
31
|
-
}),
|
|
32
|
-
);
|
|
33
|
-
|
|
@@ -1,26 +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
|
-
'deploy with parameters',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
const stackArn = await fixture.cdkDeploy('param-test-1', {
|
|
10
|
-
options: ['--parameters', `TopicNameParam=${fixture.stackNamePrefix}bazinga`],
|
|
11
|
-
captureStderr: false,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
15
|
-
new DescribeStacksCommand({
|
|
16
|
-
StackName: stackArn,
|
|
17
|
-
}),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
expect(response.Stacks?.[0].Parameters).toContainEqual({
|
|
21
|
-
ParameterKey: 'TopicNameParam',
|
|
22
|
-
ParameterValue: `${fixture.stackNamePrefix}bazinga`,
|
|
23
|
-
});
|
|
24
|
-
}),
|
|
25
|
-
);
|
|
26
|
-
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { CreateRoleCommand, DeleteRoleCommand, DeleteRolePolicyCommand, ListRolePoliciesCommand, PutRolePolicyCommand } from '@aws-sdk/client-iam';
|
|
2
|
-
import { AssumeRoleCommand, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
|
|
3
|
-
import { integTest, retry, withDefaultFixture, sleep } 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
|
-
'deploy with role',
|
|
9
|
-
withDefaultFixture(async (fixture) => {
|
|
10
|
-
if (fixture.packages.majorVersion() !== '1') {
|
|
11
|
-
return; // Nothing to do
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const roleName = `${fixture.stackNamePrefix}-test-role`;
|
|
15
|
-
|
|
16
|
-
await deleteRole();
|
|
17
|
-
|
|
18
|
-
const createResponse = await fixture.aws.iam.send(
|
|
19
|
-
new CreateRoleCommand({
|
|
20
|
-
RoleName: roleName,
|
|
21
|
-
AssumeRolePolicyDocument: JSON.stringify({
|
|
22
|
-
Version: '2012-10-17',
|
|
23
|
-
Statement: [
|
|
24
|
-
{
|
|
25
|
-
Action: 'sts:AssumeRole',
|
|
26
|
-
Principal: { Service: 'cloudformation.amazonaws.com' },
|
|
27
|
-
Effect: 'Allow',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
Action: 'sts:AssumeRole',
|
|
31
|
-
Principal: { AWS: (await fixture.aws.sts.send(new GetCallerIdentityCommand({}))).Arn },
|
|
32
|
-
Effect: 'Allow',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
}),
|
|
36
|
-
}),
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
if (!createResponse.Role) {
|
|
40
|
-
throw new Error('Role is expected to be present!!');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!createResponse.Role.Arn) {
|
|
44
|
-
throw new Error('Role arn is expected to be present!!');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const roleArn = createResponse.Role.Arn;
|
|
48
|
-
try {
|
|
49
|
-
await fixture.aws.iam.send(
|
|
50
|
-
new PutRolePolicyCommand({
|
|
51
|
-
RoleName: roleName,
|
|
52
|
-
PolicyName: 'DefaultPolicy',
|
|
53
|
-
PolicyDocument: JSON.stringify({
|
|
54
|
-
Version: '2012-10-17',
|
|
55
|
-
Statement: [
|
|
56
|
-
{
|
|
57
|
-
Action: '*',
|
|
58
|
-
Resource: '*',
|
|
59
|
-
Effect: 'Allow',
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
}),
|
|
63
|
-
}),
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
await retry(fixture.output, 'Trying to assume fresh role', retry.forSeconds(300), async () => {
|
|
67
|
-
await fixture.aws.sts.send(
|
|
68
|
-
new AssumeRoleCommand({
|
|
69
|
-
RoleArn: roleArn,
|
|
70
|
-
RoleSessionName: 'testing',
|
|
71
|
-
}),
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
// In principle, the role has replicated from 'us-east-1' to wherever we're testing.
|
|
76
|
-
// Give it a little more sleep to make sure CloudFormation is not hitting a box
|
|
77
|
-
// that doesn't have it yet.
|
|
78
|
-
await sleep(5000);
|
|
79
|
-
|
|
80
|
-
await fixture.cdkDeploy('test-2', {
|
|
81
|
-
options: ['--role-arn', roleArn],
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// Immediately delete the stack again before we delete the role.
|
|
85
|
-
//
|
|
86
|
-
// Since roles are sticky, if we delete the role before the stack, subsequent DeleteStack
|
|
87
|
-
// operations will fail when CloudFormation tries to assume the role that's already gone.
|
|
88
|
-
await fixture.cdkDestroy('test-2');
|
|
89
|
-
} finally {
|
|
90
|
-
await deleteRole();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async function deleteRole() {
|
|
94
|
-
try {
|
|
95
|
-
const response = await fixture.aws.iam.send(new ListRolePoliciesCommand({ RoleName: roleName }));
|
|
96
|
-
|
|
97
|
-
if (!response.PolicyNames) {
|
|
98
|
-
throw new Error('Policy names cannot be undefined for deleteRole() function');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
for (const policyName of response.PolicyNames) {
|
|
102
|
-
await fixture.aws.iam.send(
|
|
103
|
-
new DeleteRolePolicyCommand({
|
|
104
|
-
RoleName: roleName,
|
|
105
|
-
PolicyName: policyName,
|
|
106
|
-
}),
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
await fixture.aws.iam.send(new DeleteRoleCommand({ RoleName: roleName }));
|
|
110
|
-
} catch (e: any) {
|
|
111
|
-
if (e.message.indexOf('cannot be found') > -1) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
throw e;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}),
|
|
118
|
-
);
|
|
119
|
-
|
|
@@ -1,22 +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
|
-
'deploy with wildcard and parameters',
|
|
7
|
-
withDefaultFixture(async (fixture) => {
|
|
8
|
-
await fixture.cdkDeploy('param-test-*', {
|
|
9
|
-
options: [
|
|
10
|
-
'--parameters',
|
|
11
|
-
`${fixture.stackNamePrefix}-param-test-1:TopicNameParam=${fixture.stackNamePrefix}bazinga`,
|
|
12
|
-
'--parameters',
|
|
13
|
-
`${fixture.stackNamePrefix}-param-test-2:OtherTopicNameParam=${fixture.stackNamePrefix}ThatsMySpot`,
|
|
14
|
-
'--parameters',
|
|
15
|
-
`${fixture.stackNamePrefix}-param-test-3:DisplayNameParam=${fixture.stackNamePrefix}HeyThere`,
|
|
16
|
-
'--parameters',
|
|
17
|
-
`${fixture.stackNamePrefix}-param-test-3:OtherDisplayNameParam=${fixture.stackNamePrefix}AnotherOne`,
|
|
18
|
-
],
|
|
19
|
-
});
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
22
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DescribeStacksCommand, ListChangeSetsCommand } 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
|
-
'deploy without execute a named change set',
|
|
8
|
-
withDefaultFixture(async (fixture) => {
|
|
9
|
-
const changeSetName = 'custom-change-set-name';
|
|
10
|
-
const stackArn = await fixture.cdkDeploy('test-2', {
|
|
11
|
-
options: ['--no-execute', '--change-set-name', changeSetName],
|
|
12
|
-
captureStderr: false,
|
|
13
|
-
});
|
|
14
|
-
// verify that we only deployed a single stack (there's a single ARN in the output)
|
|
15
|
-
expect(stackArn.split('\n').length).toEqual(1);
|
|
16
|
-
|
|
17
|
-
const response = await fixture.aws.cloudFormation.send(
|
|
18
|
-
new DescribeStacksCommand({
|
|
19
|
-
StackName: stackArn,
|
|
20
|
-
}),
|
|
21
|
-
);
|
|
22
|
-
expect(response.Stacks?.[0].StackStatus).toEqual('REVIEW_IN_PROGRESS');
|
|
23
|
-
|
|
24
|
-
// verify a change set was created with the provided name
|
|
25
|
-
const changeSetResponse = await fixture.aws.cloudFormation.send(
|
|
26
|
-
new ListChangeSetsCommand({
|
|
27
|
-
StackName: stackArn,
|
|
28
|
-
}),
|
|
29
|
-
);
|
|
30
|
-
const changeSets = changeSetResponse.Summaries || [];
|
|
31
|
-
expect(changeSets.length).toEqual(1);
|
|
32
|
-
expect(changeSets[0].ChangeSetName).toEqual(changeSetName);
|
|
33
|
-
expect(changeSets[0].Status).toEqual('CREATE_COMPLETE');
|
|
34
|
-
}),
|
|
35
|
-
);
|
|
36
|
-
|