@aws-cdk-testing/cli-integ 3.5.0 → 3.7.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.
Files changed (431) hide show
  1. package/README.md +48 -39
  2. package/lib/aws.js +20 -9
  3. package/lib/cli/query-github.js +2 -3
  4. package/lib/cli/run-suite.js +123 -52
  5. package/lib/cli/stage-distribution.js +4 -4
  6. package/lib/corking.js +2 -5
  7. package/lib/eventually.js +3 -3
  8. package/lib/files.js +2 -3
  9. package/lib/github.js +5 -6
  10. package/lib/integ-test.js +58 -3
  11. package/lib/npm.d.ts +2 -0
  12. package/lib/npm.js +30 -1
  13. package/lib/package-sources/cli-npm-source.d.ts +14 -0
  14. package/lib/package-sources/cli-npm-source.js +50 -0
  15. package/lib/package-sources/cli-repo-source.d.ts +19 -0
  16. package/lib/package-sources/cli-repo-source.js +49 -0
  17. package/lib/package-sources/find-root.d.ts +6 -0
  18. package/lib/package-sources/find-root.js +18 -0
  19. package/lib/package-sources/library-globalinstall-source.d.ts +20 -0
  20. package/lib/package-sources/library-globalinstall-source.js +70 -0
  21. package/lib/package-sources/library-npm-source.d.ts +17 -0
  22. package/lib/package-sources/library-npm-source.js +60 -0
  23. package/lib/package-sources/library-preinstalled-source.d.ts +21 -0
  24. package/lib/package-sources/library-preinstalled-source.js +78 -0
  25. package/lib/package-sources/repo-tools/npm.js +4 -5
  26. package/lib/package-sources/source.d.ts +36 -18
  27. package/lib/package-sources/source.js +1 -1
  28. package/lib/package-sources/subprocess.d.ts +10 -3
  29. package/lib/package-sources/subprocess.js +31 -12
  30. package/lib/process.js +7 -6
  31. package/lib/proxy.d.ts +1 -1
  32. package/lib/proxy.js +2 -2
  33. package/lib/resource-pool.js +10 -6
  34. package/lib/shell.d.ts +3 -3
  35. package/lib/shell.js +12 -16
  36. package/lib/staging/codeartifact.js +17 -18
  37. package/lib/staging/maven.d.ts +2 -2
  38. package/lib/staging/maven.js +3 -5
  39. package/lib/staging/npm.d.ts +2 -2
  40. package/lib/staging/npm.js +1 -1
  41. package/lib/staging/nuget.d.ts +2 -2
  42. package/lib/staging/nuget.js +1 -1
  43. package/lib/staging/parallel-shell.js +2 -2
  44. package/lib/staging/pypi.d.ts +2 -2
  45. package/lib/staging/pypi.js +1 -1
  46. package/lib/staging/usage-dir.js +4 -1
  47. package/lib/with-aws.d.ts +2 -2
  48. package/lib/with-aws.js +5 -4
  49. package/lib/with-cdk-app.d.ts +9 -6
  50. package/lib/with-cdk-app.js +48 -61
  51. package/lib/with-cli-lib.d.ts +4 -3
  52. package/lib/with-cli-lib.js +5 -8
  53. package/lib/with-packages.d.ts +3 -2
  54. package/lib/with-packages.js +3 -2
  55. package/lib/with-sam.d.ts +3 -3
  56. package/lib/with-sam.js +15 -33
  57. package/lib/with-temporary-directory.d.ts +1 -1
  58. package/lib/with-temporary-directory.js +1 -1
  59. package/lib/xpmutex.js +11 -4
  60. package/lib/yarn.d.ts +6 -0
  61. package/lib/yarn.js +31 -0
  62. package/npm-shrinkwrap.json +8724 -0
  63. package/package.json +16 -11
  64. package/resources/cdk-apps/refactoring/cdk.json +7 -0
  65. package/resources/cdk-apps/refactoring/refactoring.js +18 -0
  66. package/resources/integ.jest.config.js +45 -8
  67. package/test-reports/junit.xml +15 -0
  68. package/tests/cli-integ-tests/cdk---exclusively-selects-only-selected-stack.integtest.js +2 -2
  69. package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.js +12 -12
  70. package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.js +10 -10
  71. package/tests/cli-integ-tests/cdk-automatic-ordering-with-concurrency.integtest.js +2 -2
  72. package/tests/cli-integ-tests/cdk-automatic-ordering.integtest.js +2 -2
  73. package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and---no-rollback-is-removed-from-flags.integtest.js +2 -2
  74. package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and-change-contains-a-replacement.integtest.js +2 -2
  75. package/tests/cli-integ-tests/cdk-automatic-rollback-if-replacement-and---no-rollback-is-removed-from-flags.integtest.js +2 -2
  76. package/tests/cli-integ-tests/cdk-bootstrap-a-customized-template-vendor-will-not-overwrite-the-default-template.integtest.js +2 -2
  77. package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.js +3 -4
  78. package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.js +3 -4
  79. package/tests/cli-integ-tests/cdk-bootstrap-can-and-deploy-if-omitting-execution-policies.integtest.js +2 -2
  80. package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.js +3 -4
  81. package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.js +3 -4
  82. package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.js +3 -4
  83. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-modern-synthesized-stack-even-if-bootstrap-stack-name-is-unknown.integtest.js +2 -2
  84. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-with-session-tags-on-the-deploy.integtest.js +2 -2
  85. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-without-execution-role-and-with-session-tags-on-deploy-role.integtest.js +2 -2
  86. package/tests/cli-integ-tests/cdk-bootstrap-can-dump-the-template.integtest.js +2 -2
  87. package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.js +5 -7
  88. package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.js +3 -4
  89. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-(with-slashes)-to-bootstrap.integtest.js +2 -2
  90. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-to-bootstrap.integtest.js +2 -2
  91. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-default-permissions-boundary-to-bootstrap.integtest.js +2 -2
  92. package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.js +5 -6
  93. package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap-(with-docker-image).integtest.js +2 -2
  94. package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap.integtest.js +2 -2
  95. package/tests/cli-integ-tests/cdk-bootstrap-deploy-old-style-synthesis-to-new-style-bootstrap.integtest.js +2 -2
  96. package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.js +3 -4
  97. package/tests/cli-integ-tests/cdk-bootstrap-upgrade-legacy-bootstrap-stack-to-new-bootstrap-stack-while-in-use.integtest.js +2 -2
  98. package/tests/cli-integ-tests/cdk-can-still-load-old-assemblies.integtest.js +2 -2
  99. package/tests/cli-integ-tests/cdk-cdk-diff---fail-on-multiple-stacks-exits-with-error-if-any-of-the-stacks-contains-a-diff.integtest.js +2 -2
  100. package/tests/cli-integ-tests/cdk-cdk-diff---fail-with-multiple-stack-exits-with-if-any-of-the-stacks-contains-a-diff.integtest.js +2 -2
  101. package/tests/cli-integ-tests/cdk-cdk-diff---quiet-does-not-print-there-were-no-differences-message-for-stacks-which-have-no-differences.integtest.js +2 -2
  102. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-changes-are-present.integtest.js +2 -2
  103. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-access-control-config.integtest.js +2 -2
  104. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-assignment.integtest.js +2 -2
  105. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-with-managed-policy.integtest.js +2 -2
  106. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-perm-set-without-managed-policy.integtest.js +2 -2
  107. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-access-control-information.integtest.js +2 -2
  108. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-assignment-information.integtest.js +2 -2
  109. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-with-managed-policy-information.integtest.js +2 -2
  110. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-without-managed-policy-information.integtest.js +2 -2
  111. package/tests/cli-integ-tests/cdk-cdk-diff-doesnt-show-resource-metadata-changes.integtest.js +2 -2
  112. package/tests/cli-integ-tests/cdk-cdk-diff-shows-resource-metadata-changes-with---no-change-set.integtest.js +2 -2
  113. package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-and-custom-toolkit-stack-name-and-qualifier-does-not-fail.integtest.js +2 -2
  114. package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-does-not-fail.integtest.js +2 -2
  115. package/tests/cli-integ-tests/cdk-cdk-diff.integtest.js +2 -2
  116. package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json---long.integtest.js +2 -2
  117. package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json.integtest.js +2 -2
  118. package/tests/cli-integ-tests/cdk-cdk-ls.integtest.js +2 -2
  119. package/tests/cli-integ-tests/cdk-cdk-notices-are-displayed-correctly.integtest.js +2 -2
  120. package/tests/cli-integ-tests/cdk-cdk-notices-with---unacknowledged.integtest.js +2 -2
  121. package/tests/cli-integ-tests/cdk-cdk-synth-add-the-metadata-properties-expected-by-sam.integtest.js +2 -2
  122. package/tests/cli-integ-tests/cdk-cdk-synth-bundled-functions-as-expected.integtest.js +2 -2
  123. package/tests/cli-integ-tests/cdk-cdk-synth.integtest.js +2 -2
  124. package/tests/cli-integ-tests/cdk-ci-output-to-stderr.integtest.js +2 -2
  125. package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.js +2 -2
  126. package/tests/cli-integ-tests/cdk-construct-with-builtin-lambda-function.integtest.js +2 -2
  127. package/tests/cli-integ-tests/cdk-context-in-stage-propagates-to-top.integtest.js +2 -2
  128. package/tests/cli-integ-tests/cdk-context-setting.integtest.js +2 -2
  129. package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.js +3 -4
  130. package/tests/cli-integ-tests/cdk-deploy-all-concurrently.integtest.js +2 -2
  131. package/tests/cli-integ-tests/cdk-deploy-all.integtest.js +2 -2
  132. package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.js +4 -5
  133. package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.js +4 -5
  134. package/tests/cli-integ-tests/cdk-deploy-no-stacks-error.integtest.js +2 -2
  135. package/tests/cli-integ-tests/cdk-deploy-no-stacks-with---ignore-no-stacks.integtest.js +2 -2
  136. package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.js +3 -4
  137. package/tests/cli-integ-tests/cdk-deploy-stack-with-docker-asset.integtest.js +2 -2
  138. package/tests/cli-integ-tests/cdk-deploy-stack-with-lambda-asset-to-object-lock-enabled-asset-bucket.integtest.js +2 -2
  139. package/tests/cli-integ-tests/cdk-deploy-stack-without-resource.integtest.js +2 -2
  140. package/tests/cli-integ-tests/cdk-deploy-wildcard-with-outputs.integtest.js +2 -2
  141. package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.js +3 -4
  142. package/tests/cli-integ-tests/cdk-deploy-with-method-direct-and-import-existing-resources-fails.integtest.js +2 -2
  143. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.js +3 -4
  144. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.js +3 -4
  145. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.js +3 -4
  146. package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.js +4 -5
  147. package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.js +3 -4
  148. package/tests/cli-integ-tests/cdk-deploy-with-wildcard-and-parameters.integtest.js +2 -2
  149. package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.js +3 -4
  150. package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.js +3 -4
  151. package/tests/cli-integ-tests/cdk-deploy.integtest.js +3 -4
  152. package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.js +6 -7
  153. package/tests/cli-integ-tests/cdk-doubly-nested-stack.integtest.js +2 -2
  154. package/tests/cli-integ-tests/cdk-enablediffnofail.integtest.js +2 -2
  155. package/tests/cli-integ-tests/cdk-failed-deploy-does-not-hang.integtest.js +2 -2
  156. package/tests/cli-integ-tests/cdk-fast-deploy.integtest.js +5 -6
  157. package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-ecr-images.integtest.js +2 -2
  158. package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-s3-objects.integtest.js +2 -2
  159. package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-ecr-images.integtest.js +2 -2
  160. package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-s3-objects.integtest.js +2 -2
  161. package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-ecr-images.integtest.js +2 -2
  162. package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-s3-objects.integtest.js +2 -2
  163. package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-ecr-images.integtest.js +2 -2
  164. package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.js +3 -3
  165. package/tests/cli-integ-tests/cdk-generating-and-loading-assembly.integtest.js +2 -2
  166. package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-detects-failed-deployment-and-errors.integtest.js +2 -2
  167. package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.js +7 -6
  168. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.js +3 -4
  169. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.js +4 -5
  170. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.js +4 -5
  171. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.js +4 -5
  172. package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.js +6 -7
  173. package/tests/cli-integ-tests/cdk-iam-diff.integtest.js +2 -2
  174. package/tests/cli-integ-tests/cdk-import-interactive.integtest.js +5 -6
  175. package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.js +3 -4
  176. package/tests/cli-integ-tests/cdk-lib-cli-lib-list.integtest.js +2 -2
  177. package/tests/cli-integ-tests/cdk-lib-cli-lib-synth.integtest.js +2 -2
  178. package/tests/cli-integ-tests/cdk-lib-security-related-changes-without-a-cli-are-expected-to-fail-when-approval-is-required.integtest.js +2 -3
  179. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.js +2 -2
  180. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.js +2 -2
  181. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.js +2 -2
  182. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.js +2 -2
  183. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.js +2 -2
  184. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.js +2 -2
  185. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.js +2 -2
  186. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.js +2 -2
  187. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.js +2 -2
  188. package/tests/cli-integ-tests/cdk-migrate/testcase.d.ts +1 -1
  189. package/tests/cli-integ-tests/cdk-migrate/testcase.js +4 -6
  190. package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.js +3 -4
  191. package/tests/cli-integ-tests/cdk-refactor-dry-run.integtest.js +41 -0
  192. package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.js +3 -4
  193. package/tests/cli-integ-tests/cdk-sam-can-locally-test-the-synthesized-cdk-application.integtest.js +2 -2
  194. package/tests/cli-integ-tests/cdk-security-related-changes-without-a-cli-are-expected-to-fail.integtest.js +2 -2
  195. package/tests/cli-integ-tests/cdk-skips-notice-refresh.integtest.js +2 -2
  196. package/tests/cli-integ-tests/cdk-ssm-parameter-provider-error.integtest.js +2 -2
  197. package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.js +6 -7
  198. package/tests/cli-integ-tests/cdk-stage-with-bundled-lambda-function.integtest.js +2 -2
  199. package/tests/cli-integ-tests/cdk-synth---quiet-can-be-specified-in-cdk.json.integtest.js +2 -2
  200. package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-can-be-suppressed.integtest.js +2 -2
  201. package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-leads-to-failure.integtest.js +2 -2
  202. package/tests/cli-integ-tests/cdk-templates-on-disk-contain-metadata-resource.integtest.js +2 -2
  203. package/tests/cli-integ-tests/cdk-termination-protection.integtest.js +2 -2
  204. package/tests/cli-integ-tests/cdk-test-cdk-rollback---force.integtest.js +2 -2
  205. package/tests/cli-integ-tests/cdk-test-cdk-rollback.integtest.js +2 -2
  206. package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.js +5 -5
  207. package/tests/cli-integ-tests/cdk-test-resource-import-with-construct-that-requires-bundling.integtest.js +2 -2
  208. package/tests/cli-integ-tests/cdk-test-resource-import.integtest.js +2 -2
  209. package/tests/cli-integ-tests/cdk-two-ways-of-showing-the-version.integtest.js +2 -2
  210. package/tests/cli-integ-tests/cdk-update-to-stack-in-rollback_complete-state-will-delete-stack-and-create-a-new-one.integtest.js +6 -7
  211. package/tests/cli-integ-tests/cdk-vpc-lookup.integtest.js +2 -2
  212. package/tests/cli-integ-tests/proxy.integtest.js +2 -3
  213. package/tests/init-csharp/init-csharp.integtest.js +4 -4
  214. package/tests/init-fsharp/init-fsharp.integtest.js +4 -4
  215. package/tests/init-go/init-go.integtest.js +4 -5
  216. package/tests/init-java/init-java.integtest.js +3 -3
  217. package/tests/init-javascript/init-javascript.integtest.js +3 -3
  218. package/tests/init-python/init-python.integtest.js +3 -3
  219. package/tests/init-typescript-app/init-typescript-app.integtest.js +3 -3
  220. package/tests/init-typescript-lib/init-typescript-lib.integtest.js +2 -2
  221. package/tests/tool-integrations/amplify.integtest.js +6 -6
  222. package/tests/tool-integrations/with-tool-context.d.ts +5 -5
  223. package/tests/tool-integrations/with-tool-context.js +1 -1
  224. package/tests/toolkit-lib-integ-tests/toolkit-can-cdk-deploy.integtest.d.ts +1 -0
  225. package/tests/toolkit-lib-integ-tests/toolkit-can-cdk-deploy.integtest.js +17 -0
  226. package/tests/toolkit-lib-integ-tests/toolkit-helpers.d.ts +15 -0
  227. package/tests/toolkit-lib-integ-tests/toolkit-helpers.js +45 -0
  228. package/tests/uberpackage/uberpackage.integtest.js +2 -2
  229. package/.eslintrc.js +0 -9
  230. package/lib/aws.ts +0 -303
  231. package/lib/cli/query-github.ts +0 -56
  232. package/lib/cli/run-suite.ts +0 -153
  233. package/lib/cli/stage-distribution.ts +0 -262
  234. package/lib/cli/test-root.ts +0 -3
  235. package/lib/corking.ts +0 -33
  236. package/lib/eventually.ts +0 -42
  237. package/lib/files.ts +0 -80
  238. package/lib/github.ts +0 -43
  239. package/lib/index.ts +0 -13
  240. package/lib/integ-test.ts +0 -110
  241. package/lib/lists.ts +0 -9
  242. package/lib/memoize.ts +0 -14
  243. package/lib/npm.ts +0 -41
  244. package/lib/package-sources/release-source.d.ts +0 -23
  245. package/lib/package-sources/release-source.js +0 -71
  246. package/lib/package-sources/release-source.ts +0 -82
  247. package/lib/package-sources/repo-source.d.ts +0 -30
  248. package/lib/package-sources/repo-source.js +0 -97
  249. package/lib/package-sources/repo-source.ts +0 -112
  250. package/lib/package-sources/repo-tools/npm.ts +0 -48
  251. package/lib/package-sources/source.ts +0 -35
  252. package/lib/package-sources/subprocess.ts +0 -15
  253. package/lib/process.ts +0 -154
  254. package/lib/proxy.ts +0 -64
  255. package/lib/resource-pool.ts +0 -140
  256. package/lib/resources.ts +0 -4
  257. package/lib/shell.ts +0 -331
  258. package/lib/staging/codeartifact.ts +0 -387
  259. package/lib/staging/maven.ts +0 -95
  260. package/lib/staging/npm.ts +0 -62
  261. package/lib/staging/nuget.ts +0 -75
  262. package/lib/staging/parallel-shell.ts +0 -51
  263. package/lib/staging/pypi.ts +0 -50
  264. package/lib/staging/usage-dir.ts +0 -99
  265. package/lib/with-aws.ts +0 -111
  266. package/lib/with-cdk-app.ts +0 -847
  267. package/lib/with-cli-lib.ts +0 -150
  268. package/lib/with-packages.ts +0 -15
  269. package/lib/with-sam.ts +0 -295
  270. package/lib/with-temporary-directory.ts +0 -35
  271. package/lib/with-timeout.ts +0 -33
  272. package/lib/xpmutex.ts +0 -218
  273. 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
  274. 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
  275. package/tests/cli-integ-tests/cdk---exclusively-selects-only-selected-stack.integtest.ts +0 -29
  276. package/tests/cli-integ-tests/cdk-assets/cdk-assets-uses-profile.integtest.ts +0 -92
  277. package/tests/cli-integ-tests/cdk-assets/smoketest.integtest.ts +0 -82
  278. package/tests/cli-integ-tests/cdk-automatic-ordering-with-concurrency.integtest.ts +0 -15
  279. package/tests/cli-integ-tests/cdk-automatic-ordering.integtest.ts +0 -15
  280. package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and---no-rollback-is-removed-from-flags.integtest.ts +0 -40
  281. package/tests/cli-integ-tests/cdk-automatic-rollback-if-paused-and-change-contains-a-replacement.integtest.ts +0 -40
  282. package/tests/cli-integ-tests/cdk-automatic-rollback-if-replacement-and---no-rollback-is-removed-from-flags.integtest.ts +0 -29
  283. package/tests/cli-integ-tests/cdk-bootstrap-a-customized-template-vendor-will-not-overwrite-the-default-template.integtest.ts +0 -42
  284. package/tests/cli-integ-tests/cdk-bootstrap-add-tags.integtest.ts +0 -26
  285. package/tests/cli-integ-tests/cdk-bootstrap-can-add-tags-then-update-tags-during-re-bootstrap.integtest.ts +0 -28
  286. package/tests/cli-integ-tests/cdk-bootstrap-can-and-deploy-if-omitting-execution-policies.integtest.ts +0 -21
  287. package/tests/cli-integ-tests/cdk-bootstrap-can-bootstrap-without-execution.integtest.ts +0 -22
  288. package/tests/cli-integ-tests/cdk-bootstrap-can-create-a-legacy-bootstrap-stack-with---public-access-block-configuration-false.integtest.ts +0 -21
  289. package/tests/cli-integ-tests/cdk-bootstrap-can-create-multiple-legacy-bootstrap-stacks.integtest.ts +0 -27
  290. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-modern-synthesized-stack-even-if-bootstrap-stack-name-is-unknown.integtest.ts +0 -24
  291. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-with-session-tags-on-the-deploy.integtest.ts +0 -25
  292. package/tests/cli-integ-tests/cdk-bootstrap-can-deploy-without-execution-role-and-with-session-tags-on-deploy-role.integtest.ts +0 -22
  293. package/tests/cli-integ-tests/cdk-bootstrap-can-dump-the-template.integtest.ts +0 -32
  294. package/tests/cli-integ-tests/cdk-bootstrap-can-remove-custompermissionsboundary.integtest.ts +0 -77
  295. package/tests/cli-integ-tests/cdk-bootstrap-can-remove-trusted-account.integtest.ts +0 -30
  296. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-(with-slashes)-to-bootstrap.integtest.ts +0 -15
  297. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-custom-permissions-boundary-to-bootstrap.integtest.ts +0 -15
  298. package/tests/cli-integ-tests/cdk-bootstrap-can-use-the-default-permissions-boundary-to-bootstrap.integtest.ts +0 -15
  299. package/tests/cli-integ-tests/cdk-bootstrap-create-ecr-with-tag-immutability-to-set-on.integtest.ts +0 -34
  300. package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap-(with-docker-image).integtest.ts +0 -22
  301. package/tests/cli-integ-tests/cdk-bootstrap-deploy-new-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -22
  302. package/tests/cli-integ-tests/cdk-bootstrap-deploy-old-style-synthesis-to-new-style-bootstrap.integtest.ts +0 -21
  303. package/tests/cli-integ-tests/cdk-bootstrap-switch-on-termination-protection.integtest.ts +0 -24
  304. package/tests/cli-integ-tests/cdk-bootstrap-upgrade-legacy-bootstrap-stack-to-new-bootstrap-stack-while-in-use.integtest.ts +0 -47
  305. package/tests/cli-integ-tests/cdk-can-still-load-old-assemblies.integtest.ts +0 -57
  306. 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
  307. 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
  308. 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
  309. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-changes-are-present.integtest.ts +0 -14
  310. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-access-control-config.integtest.ts +0 -13
  311. package/tests/cli-integ-tests/cdk-cdk-diff---security-only---fail-exits-when-security-diff-for-sso-assignment.integtest.ts +0 -13
  312. 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
  313. 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
  314. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-access-control-information.integtest.ts +0 -35
  315. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-assignment-information.integtest.ts +0 -37
  316. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-with-managed-policy-information.integtest.ts +0 -35
  317. package/tests/cli-integ-tests/cdk-cdk-diff---security-only-successfully-outputs-sso-permission-set-without-managed-policy-information.integtest.ts +0 -37
  318. package/tests/cli-integ-tests/cdk-cdk-diff-doesnt-show-resource-metadata-changes.integtest.ts +0 -23
  319. package/tests/cli-integ-tests/cdk-cdk-diff-shows-resource-metadata-changes-with---no-change-set.integtest.ts +0 -23
  320. 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
  321. package/tests/cli-integ-tests/cdk-cdk-diff-with-large-changeset-does-not-fail.integtest.ts +0 -28
  322. package/tests/cli-integ-tests/cdk-cdk-diff.integtest.ts +0 -18
  323. package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json---long.integtest.ts +0 -50
  324. package/tests/cli-integ-tests/cdk-cdk-ls---show-dependencies---json.integtest.ts +0 -95
  325. package/tests/cli-integ-tests/cdk-cdk-ls.integtest.ts +0 -36
  326. package/tests/cli-integ-tests/cdk-cdk-notices-are-displayed-correctly.integtest.ts +0 -42
  327. package/tests/cli-integ-tests/cdk-cdk-notices-with---unacknowledged.integtest.ts +0 -14
  328. package/tests/cli-integ-tests/cdk-cdk-synth-add-the-metadata-properties-expected-by-sam.integtest.ts +0 -126
  329. package/tests/cli-integ-tests/cdk-cdk-synth-bundled-functions-as-expected.integtest.ts +0 -80
  330. package/tests/cli-integ-tests/cdk-cdk-synth.integtest.ts +0 -53
  331. package/tests/cli-integ-tests/cdk-ci-output-to-stderr.integtest.ts +0 -19
  332. package/tests/cli-integ-tests/cdk-ci-true-output-to-stdout.integtest.ts +0 -28
  333. package/tests/cli-integ-tests/cdk-construct-with-builtin-lambda-function.integtest.ts +0 -14
  334. package/tests/cli-integ-tests/cdk-context-in-stage-propagates-to-top.integtest.ts +0 -20
  335. package/tests/cli-integ-tests/cdk-context-setting.integtest.ts +0 -33
  336. package/tests/cli-integ-tests/cdk-deploy---method-direct.integtest.ts +0 -23
  337. package/tests/cli-integ-tests/cdk-deploy-all-concurrently.integtest.ts +0 -17
  338. package/tests/cli-integ-tests/cdk-deploy-all.integtest.ts +0 -14
  339. package/tests/cli-integ-tests/cdk-deploy-and-test-stack-with-lambda-asset.integtest.ts +0 -31
  340. package/tests/cli-integ-tests/cdk-deploy-deletes-all-notification-arns-when-empty-array-is-passed.integtest.ts +0 -50
  341. package/tests/cli-integ-tests/cdk-deploy-no-stacks-error.integtest.ts +0 -18
  342. package/tests/cli-integ-tests/cdk-deploy-no-stacks-with---ignore-no-stacks.integtest.ts +0 -17
  343. package/tests/cli-integ-tests/cdk-deploy-preserves-existing-notification-arns-when-not-specified.integtest.ts +0 -51
  344. package/tests/cli-integ-tests/cdk-deploy-stack-with-docker-asset.integtest.ts +0 -11
  345. package/tests/cli-integ-tests/cdk-deploy-stack-with-lambda-asset-to-object-lock-enabled-asset-bucket.integtest.ts +0 -42
  346. package/tests/cli-integ-tests/cdk-deploy-stack-without-resource.integtest.ts +0 -32
  347. package/tests/cli-integ-tests/cdk-deploy-wildcard-with-outputs.integtest.ts +0 -28
  348. package/tests/cli-integ-tests/cdk-deploy-with-import-existing-resources-true.integtest.ts +0 -29
  349. package/tests/cli-integ-tests/cdk-deploy-with-method-direct-and-import-existing-resources-fails.integtest.ts +0 -17
  350. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-flag.integtest.ts +0 -36
  351. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop-and-flag.integtest.ts +0 -45
  352. package/tests/cli-integ-tests/cdk-deploy-with-notification-arn-as-prop.integtest.ts +0 -37
  353. package/tests/cli-integ-tests/cdk-deploy-with-parameters-multi.integtest.ts +0 -33
  354. package/tests/cli-integ-tests/cdk-deploy-with-parameters.integtest.ts +0 -26
  355. package/tests/cli-integ-tests/cdk-deploy-with-role.integtest.js +0 -97
  356. package/tests/cli-integ-tests/cdk-deploy-with-role.integtest.ts +0 -119
  357. package/tests/cli-integ-tests/cdk-deploy-with-wildcard-and-parameters.integtest.ts +0 -22
  358. package/tests/cli-integ-tests/cdk-deploy-without-execute-a-named-change-set.integtest.ts +0 -36
  359. package/tests/cli-integ-tests/cdk-deploy-without-import-existing-resources.integtest.ts +0 -28
  360. package/tests/cli-integ-tests/cdk-deploy.integtest.ts +0 -20
  361. package/tests/cli-integ-tests/cdk-destroy-interactive.integtest.ts +0 -36
  362. package/tests/cli-integ-tests/cdk-doubly-nested-stack.integtest.ts +0 -12
  363. package/tests/cli-integ-tests/cdk-enablediffnofail.integtest.ts +0 -44
  364. package/tests/cli-integ-tests/cdk-failed-deploy-does-not-hang.integtest.ts +0 -12
  365. package/tests/cli-integ-tests/cdk-fast-deploy.integtest.ts +0 -41
  366. package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-ecr-images.integtest.ts +0 -48
  367. package/tests/cli-integ-tests/cdk-gc-garbage-collection-deletes-unused-s3-objects.integtest.ts +0 -51
  368. package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-ecr-images.integtest.ts +0 -48
  369. package/tests/cli-integ-tests/cdk-gc-garbage-collection-keeps-in-use-s3-objects.integtest.ts +0 -52
  370. package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-ecr-images.integtest.ts +0 -47
  371. package/tests/cli-integ-tests/cdk-gc-garbage-collection-tags-unused-s3-objects.integtest.ts +0 -63
  372. package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-ecr-images.integtest.ts +0 -55
  373. package/tests/cli-integ-tests/cdk-gc-garbage-collection-untags-in-use-s3-objects.integtest.ts +0 -63
  374. package/tests/cli-integ-tests/cdk-generating-and-loading-assembly.integtest.ts +0 -52
  375. package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-detects-failed-deployment-and-errors.integtest.ts +0 -29
  376. package/tests/cli-integ-tests/cdk-hotswap-deployment-for-ecs-service-waits-for-deployment-to-complete.integtest.ts +0 -45
  377. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-appsync-apis-with-many-functions.integtest.ts +0 -36
  378. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-ecs-service.integtest.ts +0 -41
  379. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-fn::importvalue-intrinsic.integtest.ts +0 -53
  380. package/tests/cli-integ-tests/cdk-hotswap-deployment-supports-lambda-functions-description-and-environment-variables.integtest.ts +0 -43
  381. package/tests/cli-integ-tests/cdk-hotswap-ecs-deployment-respects-properties-override.integtest.ts +0 -59
  382. package/tests/cli-integ-tests/cdk-iam-diff.integtest.ts +0 -23
  383. package/tests/cli-integ-tests/cdk-import-interactive.integtest.ts +0 -57
  384. package/tests/cli-integ-tests/cdk-lib-cli-lib-deploy.integtest.ts +0 -32
  385. package/tests/cli-integ-tests/cdk-lib-cli-lib-list.integtest.ts +0 -12
  386. package/tests/cli-integ-tests/cdk-lib-cli-lib-synth.integtest.ts +0 -27
  387. 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
  388. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-csharp.integtest.ts +0 -13
  389. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-java.integtest.ts +0 -14
  390. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-python.integtest.ts +0 -13
  391. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate--from-stack-creates-deployable-app-typescript.integtest.ts +0 -13
  392. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-csharp.integtest.ts +0 -15
  393. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-java.integtest.ts +0 -15
  394. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-python.integtest.ts +0 -15
  395. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-deploys-successfully-typescript.integtest.ts +0 -15
  396. package/tests/cli-integ-tests/cdk-migrate/cdk-migrate-generates-migrate.json.integtest.ts +0 -20
  397. package/tests/cli-integ-tests/cdk-migrate/testcase.ts +0 -69
  398. package/tests/cli-integ-tests/cdk-nested-stack-with-parameters.integtest.ts +0 -28
  399. package/tests/cli-integ-tests/cdk-requests-go-through-a-proxy-when-configured.integtest.ts +0 -39
  400. package/tests/cli-integ-tests/cdk-sam-can-locally-test-the-synthesized-cdk-application.integtest.ts +0 -25
  401. package/tests/cli-integ-tests/cdk-security-related-changes-without-a-cli-are-expected-to-fail.integtest.ts +0 -30
  402. package/tests/cli-integ-tests/cdk-skips-notice-refresh.integtest.ts +0 -26
  403. package/tests/cli-integ-tests/cdk-ssm-parameter-provider-error.integtest.ts +0 -18
  404. package/tests/cli-integ-tests/cdk-stack-in-update_rollback_complete-state-can-be-updated.integtest.ts +0 -59
  405. package/tests/cli-integ-tests/cdk-stage-with-bundled-lambda-function.integtest.ts +0 -13
  406. package/tests/cli-integ-tests/cdk-synth---quiet-can-be-specified-in-cdk.json.integtest.ts +0 -20
  407. package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-can-be-suppressed.integtest.ts +0 -15
  408. package/tests/cli-integ-tests/cdk-synthing-a-stage-with-errors-leads-to-failure.integtest.ts +0 -18
  409. package/tests/cli-integ-tests/cdk-templates-on-disk-contain-metadata-resource.integtest.ts +0 -25
  410. package/tests/cli-integ-tests/cdk-termination-protection.integtest.ts +0 -19
  411. package/tests/cli-integ-tests/cdk-test-cdk-rollback---force.integtest.ts +0 -48
  412. package/tests/cli-integ-tests/cdk-test-cdk-rollback.integtest.ts +0 -38
  413. package/tests/cli-integ-tests/cdk-test-migrate-deployment-for-app-with-localfile-source-in-migrate.json.integtest.ts +0 -56
  414. package/tests/cli-integ-tests/cdk-test-resource-import-with-construct-that-requires-bundling.integtest.ts +0 -74
  415. package/tests/cli-integ-tests/cdk-test-resource-import.integtest.ts +0 -64
  416. package/tests/cli-integ-tests/cdk-two-ways-of-showing-the-version.integtest.ts +0 -14
  417. 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
  418. package/tests/cli-integ-tests/cdk-vpc-lookup.integtest.ts +0 -26
  419. package/tests/cli-integ-tests/proxy.integtest.ts +0 -168
  420. package/tests/init-csharp/init-csharp.integtest.ts +0 -15
  421. package/tests/init-fsharp/init-fsharp.integtest.ts +0 -15
  422. package/tests/init-go/init-go.integtest.ts +0 -28
  423. package/tests/init-java/init-java.integtest.ts +0 -14
  424. package/tests/init-javascript/init-javascript.integtest.ts +0 -58
  425. package/tests/init-python/init-python.integtest.ts +0 -20
  426. package/tests/init-typescript-app/init-typescript-app.integtest.ts +0 -67
  427. package/tests/init-typescript-lib/init-typescript-lib.integtest.ts +0 -13
  428. package/tests/tool-integrations/amplify.integtest.ts +0 -117
  429. package/tests/tool-integrations/with-tool-context.ts +0 -14
  430. package/tests/uberpackage/uberpackage.integtest.ts +0 -11
  431. /package/tests/cli-integ-tests/{cdk-deploy-with-role.integtest.d.ts → cdk-refactor-dry-run.integtest.d.ts} +0 -0
@@ -1,63 +0,0 @@
1
- import { GetObjectTaggingCommand, ListObjectsV2Command } from '@aws-sdk/client-s3';
2
- import { integTest, withoutBootstrap, randomString } 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
- 'Garbage Collection tags unused s3 objects',
8
- withoutBootstrap(async (fixture) => {
9
- const toolkitStackName = fixture.bootstrapStackName;
10
- const bootstrapBucketName = `aws-cdk-garbage-collect-integ-test-bckt-${randomString()}`;
11
- fixture.rememberToDeleteBucket(bootstrapBucketName); // just in case
12
-
13
- await fixture.cdkBootstrapModern({
14
- toolkitStackName,
15
- bootstrapBucketName,
16
- });
17
-
18
- await fixture.cdkDeploy('lambda', {
19
- options: [
20
- '--context', `bootstrapBucket=${bootstrapBucketName}`,
21
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
22
- '--toolkit-stack-name', toolkitStackName,
23
- '--force',
24
- ],
25
- });
26
- fixture.log('Setup complete!');
27
-
28
- await fixture.cdkDestroy('lambda', {
29
- options: [
30
- '--context', `bootstrapBucket=${bootstrapBucketName}`,
31
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
32
- '--toolkit-stack-name', toolkitStackName,
33
- '--force',
34
- ],
35
- });
36
-
37
- await fixture.cdkGarbageCollect({
38
- rollbackBufferDays: 100, // this will ensure that we do not delete assets immediately (and just tag them)
39
- type: 's3',
40
- bootstrapStackName: toolkitStackName,
41
- });
42
- fixture.log('Garbage collection complete!');
43
-
44
- // assert that the bootstrap bucket has the object and is tagged
45
- await fixture.aws.s3.send(new ListObjectsV2Command({ Bucket: bootstrapBucketName }))
46
- .then(async (result) => {
47
- expect(result.Contents).toHaveLength(2); // also the CFN template
48
- const key = result.Contents![0].Key;
49
- const tags = await fixture.aws.s3.send(new GetObjectTaggingCommand({ Bucket: bootstrapBucketName, Key: key }));
50
- expect(tags.TagSet).toHaveLength(1);
51
- });
52
-
53
- await fixture.cdkDestroy('lambda', {
54
- options: [
55
- '--context', `bootstrapBucket=${bootstrapBucketName}`,
56
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
57
- '--toolkit-stack-name', toolkitStackName,
58
- '--force',
59
- ],
60
- });
61
- }),
62
- );
63
-
@@ -1,55 +0,0 @@
1
- import { BatchGetImageCommand, ListImagesCommand, PutImageCommand } from '@aws-sdk/client-ecr';
2
- import { integTest, withoutBootstrap } from '../../lib';
3
-
4
- const ECR_ISOLATED_TAG = 'aws-cdk.isolated';
5
-
6
- jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
7
-
8
- integTest(
9
- 'Garbage Collection untags in-use ecr images',
10
- withoutBootstrap(async (fixture) => {
11
- const toolkitStackName = fixture.bootstrapStackName;
12
-
13
- await fixture.cdkBootstrapModern({
14
- toolkitStackName,
15
- });
16
-
17
- const repoName = await fixture.bootstrapRepoName();
18
-
19
- await fixture.cdkDeploy('docker-in-use', {
20
- options: [
21
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
22
- '--toolkit-stack-name', toolkitStackName,
23
- '--force',
24
- ],
25
- });
26
- fixture.log('Setup complete!');
27
-
28
- // Artificially add tagging to the asset in the bootstrap bucket
29
- const imageIds = await fixture.aws.ecr.send(new ListImagesCommand({ repositoryName: repoName }));
30
- const digest = imageIds.imageIds![0].imageDigest;
31
- const imageManifests = await fixture.aws.ecr.send(new BatchGetImageCommand({ repositoryName: repoName, imageIds: [{ imageDigest: digest }] }));
32
- const manifest = imageManifests.images![0].imageManifest;
33
- await fixture.aws.ecr.send(new PutImageCommand({ repositoryName: repoName, imageManifest: manifest, imageDigest: digest, imageTag: `0-${ECR_ISOLATED_TAG}-12345` }));
34
-
35
- await fixture.cdkGarbageCollect({
36
- rollbackBufferDays: 100, // this will ensure that we do not delete assets immediately (and just tag them)
37
- type: 'ecr',
38
- bootstrapStackName: toolkitStackName,
39
- });
40
- fixture.log('Garbage collection complete!');
41
-
42
- await fixture.aws.ecr.send(new ListImagesCommand({ repositoryName: repoName }))
43
- .then((result) => {
44
- expect(result.imageIds).toHaveLength(1); // the second tag has been removed
45
- });
46
-
47
- await fixture.cdkDestroy('docker-in-use', {
48
- options: [
49
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
50
- '--toolkit-stack-name', toolkitStackName,
51
- '--force',
52
- ],
53
- });
54
- }),
55
- );
@@ -1,63 +0,0 @@
1
- import { GetObjectTaggingCommand, ListObjectsV2Command, PutObjectTaggingCommand } from '@aws-sdk/client-s3';
2
- import { integTest, withoutBootstrap, randomString } from '../../lib';
3
-
4
- const S3_ISOLATED_TAG = 'aws-cdk:isolated';
5
-
6
- jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
7
-
8
- integTest(
9
- 'Garbage Collection untags in-use s3 objects',
10
- withoutBootstrap(async (fixture) => {
11
- const toolkitStackName = fixture.bootstrapStackName;
12
- const bootstrapBucketName = `aws-cdk-garbage-collect-integ-test-bckt-${randomString()}`;
13
- fixture.rememberToDeleteBucket(bootstrapBucketName); // just in case
14
-
15
- await fixture.cdkBootstrapModern({
16
- toolkitStackName,
17
- bootstrapBucketName,
18
- });
19
-
20
- await fixture.cdkDeploy('lambda', {
21
- options: [
22
- '--context', `bootstrapBucket=${bootstrapBucketName}`,
23
- '--context', `@aws-cdk/core:bootstrapQualifier=${fixture.qualifier}`,
24
- '--toolkit-stack-name', toolkitStackName,
25
- '--force',
26
- ],
27
- });
28
- fixture.log('Setup complete!');
29
-
30
- // Artificially add tagging to the asset in the bootstrap bucket
31
- const result = await fixture.aws.s3.send(new ListObjectsV2Command({ Bucket: bootstrapBucketName }));
32
- const key = result.Contents!.filter((c) => c.Key?.split('.')[1] == 'zip')[0].Key; // fancy footwork to make sure we have the asset key
33
- await fixture.aws.s3.send(new PutObjectTaggingCommand({
34
- Bucket: bootstrapBucketName,
35
- Key: key,
36
- Tagging: {
37
- TagSet: [{
38
- Key: S3_ISOLATED_TAG,
39
- Value: '12345',
40
- }, {
41
- Key: 'bogus',
42
- Value: 'val',
43
- }],
44
- },
45
- }));
46
-
47
- await fixture.cdkGarbageCollect({
48
- rollbackBufferDays: 100, // this will ensure that we do not delete assets immediately (and just tag them)
49
- type: 's3',
50
- bootstrapStackName: toolkitStackName,
51
- });
52
- fixture.log('Garbage collection complete!');
53
-
54
- // assert that the isolated object tag is removed while the other tag remains
55
- const newTags = await fixture.aws.s3.send(new GetObjectTaggingCommand({ Bucket: bootstrapBucketName, Key: key }));
56
-
57
- expect(newTags.TagSet).toEqual([{
58
- Key: 'bogus',
59
- Value: 'val',
60
- }]);
61
- }),
62
- );
63
-
@@ -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
-
@@ -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
-
@@ -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
-