@datadog/datadog-ci 2.48.0 → 3.0.1
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/README.md +9 -2
- package/dist/__tests__/cli.test.d.ts +1 -0
- package/dist/__tests__/cli.test.js +92 -0
- package/dist/__tests__/cli.test.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/cloud-run/__tests__/fixtures.d.ts +2 -0
- package/dist/commands/cloud-run/__tests__/fixtures.js +12 -0
- package/dist/commands/cloud-run/__tests__/fixtures.js.map +1 -0
- package/dist/commands/cloud-run/__tests__/flare.test.d.ts +1 -0
- package/dist/commands/cloud-run/__tests__/flare.test.js +557 -0
- package/dist/commands/cloud-run/__tests__/flare.test.js.map +1 -0
- package/dist/commands/coverage/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/coverage/__tests__/upload.test.js +323 -0
- package/dist/commands/coverage/__tests__/upload.test.js.map +1 -0
- package/dist/commands/coverage/__tests__/utils.test.d.ts +1 -0
- package/dist/commands/coverage/__tests__/utils.test.js +57 -0
- package/dist/commands/coverage/__tests__/utils.test.js.map +1 -0
- package/dist/commands/coverage/api.d.ts +9 -0
- package/dist/commands/coverage/api.js +52 -0
- package/dist/commands/coverage/api.js.map +1 -0
- package/dist/commands/coverage/cli.d.ts +1 -0
- package/dist/commands/coverage/cli.js +5 -0
- package/dist/commands/coverage/cli.js.map +1 -0
- package/dist/commands/coverage/interfaces.d.ts +13 -0
- package/dist/commands/coverage/interfaces.js +3 -0
- package/dist/commands/coverage/interfaces.js.map +1 -0
- package/dist/commands/coverage/renderer.d.ts +12 -0
- package/dist/commands/coverage/renderer.js +83 -0
- package/dist/commands/coverage/renderer.js.map +1 -0
- package/dist/commands/coverage/upload.d.ts +27 -0
- package/dist/commands/coverage/upload.js +329 -0
- package/dist/commands/coverage/upload.js.map +1 -0
- package/dist/commands/coverage/utils.d.ts +3 -0
- package/dist/commands/coverage/utils.js +83 -0
- package/dist/commands/coverage/utils.js.map +1 -0
- package/dist/commands/deployment/__tests__/correlate.test.d.ts +1 -0
- package/dist/commands/deployment/__tests__/correlate.test.js +106 -0
- package/dist/commands/deployment/__tests__/correlate.test.js.map +1 -0
- package/dist/commands/deployment/__tests__/mark.test.d.ts +1 -0
- package/dist/commands/deployment/__tests__/mark.test.js +97 -0
- package/dist/commands/deployment/__tests__/mark.test.js.map +1 -0
- package/dist/commands/dora/__tests__/deployment.test.d.ts +1 -0
- package/dist/commands/dora/__tests__/deployment.test.js +201 -0
- package/dist/commands/dora/__tests__/deployment.test.js.map +1 -0
- package/dist/commands/dsyms/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/dsyms/__tests__/upload.test.js +346 -0
- package/dist/commands/dsyms/__tests__/upload.test.js.map +1 -0
- package/dist/commands/dsyms/__tests__/utils.test.d.ts +1 -0
- package/dist/commands/dsyms/__tests__/utils.test.js +100 -0
- package/dist/commands/dsyms/__tests__/utils.test.js.map +1 -0
- package/dist/commands/dsyms/upload.js +3 -3
- package/dist/commands/dsyms/upload.js.map +1 -1
- package/dist/commands/dsyms/utils.js +7 -6
- package/dist/commands/dsyms/utils.js.map +1 -1
- package/dist/commands/elf-symbols/__tests__/elf.test.d.ts +1 -0
- package/dist/commands/elf-symbols/__tests__/elf.test.js +819 -0
- package/dist/commands/elf-symbols/__tests__/elf.test.js.map +1 -0
- package/dist/commands/elf-symbols/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/elf-symbols/__tests__/upload.test.js +224 -0
- package/dist/commands/elf-symbols/__tests__/upload.test.js.map +1 -0
- package/dist/commands/elf-symbols/elf.d.ts +1 -0
- package/dist/commands/elf-symbols/upload.js +2 -3
- package/dist/commands/elf-symbols/upload.js.map +1 -1
- package/dist/commands/flutter-symbols/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/flutter-symbols/__tests__/upload.test.js +617 -0
- package/dist/commands/flutter-symbols/__tests__/upload.test.js.map +1 -0
- package/dist/commands/flutter-symbols/upload.js +2 -2
- package/dist/commands/flutter-symbols/upload.js.map +1 -1
- package/dist/commands/gate/__tests__/evaluate.test.d.ts +1 -0
- package/dist/commands/gate/__tests__/evaluate.test.js +398 -0
- package/dist/commands/gate/__tests__/evaluate.test.js.map +1 -0
- package/dist/commands/gate/__tests__/scope.test.d.ts +1 -0
- package/dist/commands/gate/__tests__/scope.test.js +29 -0
- package/dist/commands/gate/__tests__/scope.test.js.map +1 -0
- package/dist/commands/git-metadata/__tests__/git.test.d.ts +1 -0
- package/dist/commands/git-metadata/__tests__/git.test.js +132 -0
- package/dist/commands/git-metadata/__tests__/git.test.js.map +1 -0
- package/dist/commands/git-metadata/__tests__/gitdb.test.d.ts +1 -0
- package/dist/commands/git-metadata/__tests__/gitdb.test.js +1386 -0
- package/dist/commands/git-metadata/__tests__/gitdb.test.js.map +1 -0
- package/dist/commands/git-metadata/__tests__/library.test.d.ts +1 -0
- package/dist/commands/git-metadata/__tests__/library.test.js +118 -0
- package/dist/commands/git-metadata/__tests__/library.test.js.map +1 -0
- package/dist/commands/git-metadata/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/git-metadata/__tests__/upload.test.js +52 -0
- package/dist/commands/git-metadata/__tests__/upload.test.js.map +1 -0
- package/dist/commands/git-metadata/upload.d.ts +0 -1
- package/dist/commands/git-metadata/upload.js +0 -6
- package/dist/commands/git-metadata/upload.js.map +1 -1
- package/dist/commands/junit/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/junit/__tests__/upload.test.js +446 -0
- package/dist/commands/junit/__tests__/upload.test.js.map +1 -0
- package/dist/commands/junit/renderer.d.ts +0 -1
- package/dist/commands/junit/renderer.js +1 -5
- package/dist/commands/junit/renderer.js.map +1 -1
- package/dist/commands/junit/upload.d.ts +0 -2
- package/dist/commands/junit/upload.js +8 -21
- package/dist/commands/junit/upload.js.map +1 -1
- package/dist/commands/lambda/__tests__/fixtures.d.ts +51 -0
- package/dist/commands/lambda/__tests__/fixtures.js +146 -0
- package/dist/commands/lambda/__tests__/fixtures.js.map +1 -0
- package/dist/commands/lambda/__tests__/flare.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/flare.test.js +730 -0
- package/dist/commands/lambda/__tests__/flare.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/functions/commons.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/functions/commons.test.js +791 -0
- package/dist/commands/lambda/__tests__/functions/commons.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part1.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js +386 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part2.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js +721 -0
- package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/functions/uninstrument.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/functions/uninstrument.test.js +513 -0
- package/dist/commands/lambda/__tests__/functions/uninstrument.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/functions/versionChecker.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/functions/versionChecker.test.js +33 -0
- package/dist/commands/lambda/__tests__/functions/versionChecker.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/instrument.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/instrument.test.js +1537 -0
- package/dist/commands/lambda/__tests__/instrument.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/loggroup.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/loggroup.test.js +340 -0
- package/dist/commands/lambda/__tests__/loggroup.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/prompt.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/prompt.test.js +206 -0
- package/dist/commands/lambda/__tests__/prompt.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/tags.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/tags.test.js +305 -0
- package/dist/commands/lambda/__tests__/tags.test.js.map +1 -0
- package/dist/commands/lambda/__tests__/uninstrument.test.d.ts +1 -0
- package/dist/commands/lambda/__tests__/uninstrument.test.js +722 -0
- package/dist/commands/lambda/__tests__/uninstrument.test.js.map +1 -0
- package/dist/commands/lambda/constants.d.ts +2 -0
- package/dist/commands/lambda/constants.js +4 -0
- package/dist/commands/lambda/constants.js.map +1 -1
- package/dist/commands/lambda/functions/commons.d.ts +1 -1
- package/dist/commands/measure/__tests__/measure.test.d.ts +1 -0
- package/dist/commands/measure/__tests__/measure.test.js +102 -0
- package/dist/commands/measure/__tests__/measure.test.js.map +1 -0
- package/dist/commands/measure/measure.d.ts +0 -1
- package/dist/commands/measure/measure.js +2 -9
- package/dist/commands/measure/measure.js.map +1 -1
- package/dist/commands/react-native/__tests__/codepush.test.d.ts +1 -0
- package/dist/commands/react-native/__tests__/codepush.test.js +161 -0
- package/dist/commands/react-native/__tests__/codepush.test.js.map +1 -0
- package/dist/commands/react-native/__tests__/interfaces.test.d.ts +1 -0
- package/dist/commands/react-native/__tests__/interfaces.test.js +33 -0
- package/dist/commands/react-native/__tests__/interfaces.test.js.map +1 -0
- package/dist/commands/react-native/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/react-native/__tests__/upload.test.js +238 -0
- package/dist/commands/react-native/__tests__/upload.test.js.map +1 -0
- package/dist/commands/react-native/__tests__/utils.test.d.ts +1 -0
- package/dist/commands/react-native/__tests__/utils.test.js +27 -0
- package/dist/commands/react-native/__tests__/utils.test.js.map +1 -0
- package/dist/commands/react-native/__tests__/xcode.test.d.ts +1 -0
- package/dist/commands/react-native/__tests__/xcode.test.js +465 -0
- package/dist/commands/react-native/__tests__/xcode.test.js.map +1 -0
- package/dist/commands/sarif/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/sarif/__tests__/upload.test.js +218 -0
- package/dist/commands/sarif/__tests__/upload.test.js.map +1 -0
- package/dist/commands/sarif/__tests__/validation.test.d.ts +1 -0
- package/dist/commands/sarif/__tests__/validation.test.js +19 -0
- package/dist/commands/sarif/__tests__/validation.test.js.map +1 -0
- package/dist/commands/sarif/api.js +1 -1
- package/dist/commands/sarif/api.js.map +1 -1
- package/dist/commands/sarif/interfaces.d.ts +0 -1
- package/dist/commands/sarif/renderer.d.ts +2 -2
- package/dist/commands/sarif/renderer.js +5 -5
- package/dist/commands/sarif/renderer.js.map +1 -1
- package/dist/commands/sarif/upload.d.ts +1 -1
- package/dist/commands/sarif/upload.js +15 -10
- package/dist/commands/sarif/upload.js.map +1 -1
- package/dist/commands/sbom/__tests__/payload.test.d.ts +1 -0
- package/dist/commands/sbom/__tests__/payload.test.js +306 -0
- package/dist/commands/sbom/__tests__/payload.test.js.map +1 -0
- package/dist/commands/sbom/__tests__/validation.test.d.ts +1 -0
- package/dist/commands/sbom/__tests__/validation.test.js +141 -0
- package/dist/commands/sbom/__tests__/validation.test.js.map +1 -0
- package/dist/commands/sbom/upload.d.ts +1 -1
- package/dist/commands/sbom/upload.js +9 -3
- package/dist/commands/sbom/upload.js.map +1 -1
- package/dist/commands/sourcemaps/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/sourcemaps/__tests__/upload.test.js +270 -0
- package/dist/commands/sourcemaps/__tests__/upload.test.js.map +1 -0
- package/dist/commands/sourcemaps/__tests__/utils.test.d.ts +1 -0
- package/dist/commands/sourcemaps/__tests__/utils.test.js +31 -0
- package/dist/commands/sourcemaps/__tests__/utils.test.js.map +1 -0
- package/dist/commands/sourcemaps/upload.d.ts +1 -0
- package/dist/commands/sourcemaps/upload.js +6 -2
- package/dist/commands/sourcemaps/upload.js.map +1 -1
- package/dist/commands/stepfunctions/__tests__/awsCommands.test.d.ts +1 -0
- package/dist/commands/stepfunctions/__tests__/awsCommands.test.js +210 -0
- package/dist/commands/stepfunctions/__tests__/awsCommands.test.js.map +1 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.d.ts +6 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js +45 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js.map +1 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/cli.d.ts +5 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/cli.js +19 -0
- package/dist/commands/stepfunctions/__tests__/fixtures/cli.js.map +1 -0
- package/dist/commands/stepfunctions/__tests__/helpers.test.d.ts +1 -0
- package/dist/commands/stepfunctions/__tests__/helpers.test.js +501 -0
- package/dist/commands/stepfunctions/__tests__/helpers.test.js.map +1 -0
- package/dist/commands/stepfunctions/__tests__/instrument.test.d.ts +1 -0
- package/dist/commands/stepfunctions/__tests__/instrument.test.js +431 -0
- package/dist/commands/stepfunctions/__tests__/instrument.test.js.map +1 -0
- package/dist/commands/stepfunctions/__tests__/uninstrument.test.d.ts +1 -0
- package/dist/commands/stepfunctions/__tests__/uninstrument.test.js +166 -0
- package/dist/commands/stepfunctions/__tests__/uninstrument.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/api.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/api.test.js +416 -0
- package/dist/commands/synthetics/__tests__/api.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/batch.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/batch.test.js +906 -0
- package/dist/commands/synthetics/__tests__/batch.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/cli.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/cli.test.js +1371 -0
- package/dist/commands/synthetics/__tests__/cli.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/deploy-tests-lib.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/deploy-tests-lib.test.js +112 -0
- package/dist/commands/synthetics/__tests__/deploy-tests-lib.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/fixtures.d.ts +123 -0
- package/dist/commands/synthetics/__tests__/fixtures.js +493 -0
- package/dist/commands/synthetics/__tests__/fixtures.js.map +1 -0
- package/dist/commands/synthetics/__tests__/import-tests-lib.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/import-tests-lib.test.js +186 -0
- package/dist/commands/synthetics/__tests__/import-tests-lib.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/mobile.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/mobile.test.js +376 -0
- package/dist/commands/synthetics/__tests__/mobile.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/multilocator.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/multilocator.test.js +132 -0
- package/dist/commands/synthetics/__tests__/multilocator.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/reporters/default.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/reporters/default.test.js +410 -0
- package/dist/commands/synthetics/__tests__/reporters/default.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/reporters/junit.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/reporters/junit.test.js +354 -0
- package/dist/commands/synthetics/__tests__/reporters/junit.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js +232 -0
- package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/run-tests-lib.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/run-tests-lib.test.js +698 -0
- package/dist/commands/synthetics/__tests__/run-tests-lib.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/test.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/test.test.js +269 -0
- package/dist/commands/synthetics/__tests__/test.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/crypto.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js +21 -0
- package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js +80 -0
- package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/websocket.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js +109 -0
- package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/utils/internal.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/utils/internal.test.js +161 -0
- package/dist/commands/synthetics/__tests__/utils/internal.test.js.map +1 -0
- package/dist/commands/synthetics/__tests__/utils/public.test.d.ts +1 -0
- package/dist/commands/synthetics/__tests__/utils/public.test.js +575 -0
- package/dist/commands/synthetics/__tests__/utils/public.test.js.map +1 -0
- package/dist/commands/synthetics/api.d.ts +4 -2
- package/dist/commands/synthetics/api.js +20 -1
- package/dist/commands/synthetics/api.js.map +1 -1
- package/dist/commands/synthetics/batch.d.ts +4 -2
- package/dist/commands/synthetics/batch.js +65 -7
- package/dist/commands/synthetics/batch.js.map +1 -1
- package/dist/commands/synthetics/cli.js +3 -1
- package/dist/commands/synthetics/cli.js.map +1 -1
- package/dist/commands/synthetics/deploy-tests-command.d.ts +22 -0
- package/dist/commands/synthetics/deploy-tests-command.js +150 -0
- package/dist/commands/synthetics/deploy-tests-command.js.map +1 -0
- package/dist/commands/synthetics/deploy-tests-lib.d.ts +2 -0
- package/dist/commands/synthetics/deploy-tests-lib.js +72 -0
- package/dist/commands/synthetics/deploy-tests-lib.js.map +1 -0
- package/dist/commands/synthetics/errors.d.ts +1 -1
- package/dist/commands/synthetics/errors.js +1 -0
- package/dist/commands/synthetics/errors.js.map +1 -1
- package/dist/commands/synthetics/import-tests-command.d.ts +22 -0
- package/dist/commands/synthetics/import-tests-command.js +142 -0
- package/dist/commands/synthetics/import-tests-command.js.map +1 -0
- package/dist/commands/synthetics/import-tests-lib.d.ts +2 -0
- package/dist/commands/synthetics/import-tests-lib.js +71 -0
- package/dist/commands/synthetics/import-tests-lib.js.map +1 -0
- package/dist/commands/synthetics/interfaces.d.ts +74 -28
- package/dist/commands/synthetics/interfaces.js.map +1 -1
- package/dist/commands/synthetics/local-test-definition.d.ts +2 -0
- package/dist/commands/synthetics/local-test-definition.js +16 -0
- package/dist/commands/synthetics/local-test-definition.js.map +1 -0
- package/dist/commands/synthetics/mobile.js +2 -2
- package/dist/commands/synthetics/mobile.js.map +1 -1
- package/dist/commands/synthetics/multilocator.d.ts +3 -0
- package/dist/commands/synthetics/multilocator.js +98 -0
- package/dist/commands/synthetics/multilocator.js.map +1 -0
- package/dist/commands/synthetics/reporters/junit.d.ts +1 -2
- package/dist/commands/synthetics/reporters/junit.js +5 -6
- package/dist/commands/synthetics/reporters/junit.js.map +1 -1
- package/dist/commands/synthetics/run-tests-command.d.ts +0 -9
- package/dist/commands/synthetics/run-tests-command.js +22 -64
- package/dist/commands/synthetics/run-tests-command.js.map +1 -1
- package/dist/commands/synthetics/run-tests-lib.js +24 -12
- package/dist/commands/synthetics/run-tests-lib.js.map +1 -1
- package/dist/commands/synthetics/test.d.ts +10 -19
- package/dist/commands/synthetics/test.js +93 -13
- package/dist/commands/synthetics/test.js.map +1 -1
- package/dist/commands/synthetics/tunnel/tunnel.js +2 -2
- package/dist/commands/synthetics/tunnel/tunnel.js.map +1 -1
- package/dist/commands/synthetics/utils/internal.d.ts +3 -1
- package/dist/commands/synthetics/utils/internal.js +18 -8
- package/dist/commands/synthetics/utils/internal.js.map +1 -1
- package/dist/commands/synthetics/utils/public.d.ts +5 -26
- package/dist/commands/synthetics/utils/public.js +13 -248
- package/dist/commands/synthetics/utils/public.js.map +1 -1
- package/dist/commands/tag/__tests__/tag.test.d.ts +1 -0
- package/dist/commands/tag/__tests__/tag.test.js +85 -0
- package/dist/commands/tag/__tests__/tag.test.js.map +1 -0
- package/dist/commands/trace/__tests__/trace.test.d.ts +1 -0
- package/dist/commands/trace/__tests__/trace.test.js +145 -0
- package/dist/commands/trace/__tests__/trace.test.js.map +1 -0
- package/dist/commands/unity-symbols/__tests__/upload.test.d.ts +1 -0
- package/dist/commands/unity-symbols/__tests__/upload.test.js +369 -0
- package/dist/commands/unity-symbols/__tests__/upload.test.js.map +1 -0
- package/dist/commands/unity-symbols/upload.js +2 -2
- package/dist/commands/unity-symbols/upload.js.map +1 -1
- package/dist/helpers/__tests__/app.test.d.ts +1 -0
- package/dist/helpers/__tests__/app.test.js +31 -0
- package/dist/helpers/__tests__/app.test.js.map +1 -0
- package/dist/helpers/__tests__/ci.test.d.ts +1 -0
- package/dist/helpers/__tests__/ci.test.js +295 -0
- package/dist/helpers/__tests__/ci.test.js.map +1 -0
- package/dist/helpers/__tests__/env.test.d.ts +1 -0
- package/dist/helpers/__tests__/env.test.js +74 -0
- package/dist/helpers/__tests__/env.test.js.map +1 -0
- package/dist/helpers/__tests__/fips.test.d.ts +1 -0
- package/dist/helpers/__tests__/fips.test.js +30 -0
- package/dist/helpers/__tests__/fips.test.js.map +1 -0
- package/dist/helpers/__tests__/fixtures.d.ts +41 -0
- package/dist/helpers/__tests__/fixtures.js +80 -0
- package/dist/helpers/__tests__/fixtures.js.map +1 -0
- package/dist/helpers/__tests__/flare.test.d.ts +1 -0
- package/dist/helpers/__tests__/flare.test.js +226 -0
- package/dist/helpers/__tests__/flare.test.js.map +1 -0
- package/dist/helpers/__tests__/fs.test.d.ts +1 -0
- package/dist/helpers/__tests__/fs.test.js +189 -0
- package/dist/helpers/__tests__/fs.test.js.map +1 -0
- package/dist/helpers/__tests__/id.test.d.ts +1 -0
- package/dist/helpers/__tests__/id.test.js +24 -0
- package/dist/helpers/__tests__/id.test.js.map +1 -0
- package/dist/helpers/__tests__/plist.test.d.ts +1 -0
- package/dist/helpers/__tests__/plist.test.js +43 -0
- package/dist/helpers/__tests__/plist.test.js.map +1 -0
- package/dist/helpers/__tests__/prompt.test.d.ts +1 -0
- package/dist/helpers/__tests__/prompt.test.js +71 -0
- package/dist/helpers/__tests__/prompt.test.js.map +1 -0
- package/dist/helpers/__tests__/retry.test.d.ts +1 -0
- package/dist/helpers/__tests__/retry.test.js +99 -0
- package/dist/helpers/__tests__/retry.test.js.map +1 -0
- package/dist/helpers/__tests__/tags.test.d.ts +1 -0
- package/dist/helpers/__tests__/tags.test.js +303 -0
- package/dist/helpers/__tests__/tags.test.js.map +1 -0
- package/dist/helpers/__tests__/upload.test.d.ts +1 -0
- package/dist/helpers/__tests__/upload.test.js +231 -0
- package/dist/helpers/__tests__/upload.test.js.map +1 -0
- package/dist/helpers/__tests__/user-provided-git.test.d.ts +1 -0
- package/dist/helpers/__tests__/user-provided-git.test.js +119 -0
- package/dist/helpers/__tests__/user-provided-git.test.js.map +1 -0
- package/dist/helpers/__tests__/utils.test.d.ts +1 -0
- package/dist/helpers/__tests__/utils.test.js +429 -0
- package/dist/helpers/__tests__/utils.test.js.map +1 -0
- package/dist/helpers/__tests__/validation.test.d.ts +1 -0
- package/dist/helpers/__tests__/validation.test.js +25 -0
- package/dist/helpers/__tests__/validation.test.js.map +1 -0
- package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.d.ts +1 -0
- package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js +103 -0
- package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js.map +1 -0
- package/dist/helpers/git/__tests__/format-git-span-data.test.d.ts +1 -0
- package/dist/helpers/git/__tests__/format-git-span-data.test.js +121 -0
- package/dist/helpers/git/__tests__/format-git-span-data.test.js.map +1 -0
- package/dist/helpers/git/__tests__/get-git-data.test.d.ts +1 -0
- package/dist/helpers/git/__tests__/get-git-data.test.js +72 -0
- package/dist/helpers/git/__tests__/get-git-data.test.js.map +1 -0
- package/dist/helpers/id.js.map +1 -0
- package/dist/helpers/tags.d.ts +1 -4
- package/dist/helpers/tags.js +2 -6
- package/dist/helpers/tags.js.map +1 -1
- package/dist/helpers/utils.d.ts +0 -4
- package/dist/helpers/utils.js +1 -21
- package/dist/helpers/utils.js.map +1 -1
- package/package.json +16 -17
- package/dist/commands/junit/id.js.map +0 -1
- package/dist/commands/synthetics/compatibility.d.ts +0 -7
- package/dist/commands/synthetics/compatibility.js +0 -83
- package/dist/commands/synthetics/compatibility.js.map +0 -1
- /package/dist/{commands/junit → helpers}/id.d.ts +0 -0
- /package/dist/{commands/junit → helpers}/id.js +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const clipanion_1 = require("clipanion");
|
|
13
|
+
const fixtures_1 = require("../../../helpers/__tests__/fixtures");
|
|
14
|
+
const mark_1 = require("../mark");
|
|
15
|
+
const makeCLI = () => {
|
|
16
|
+
const cli = new clipanion_1.Cli();
|
|
17
|
+
cli.register(mark_1.DeploymentMarkCommand);
|
|
18
|
+
return cli;
|
|
19
|
+
};
|
|
20
|
+
const createMockContext = () => {
|
|
21
|
+
let out = '';
|
|
22
|
+
let err = '';
|
|
23
|
+
return {
|
|
24
|
+
stderr: {
|
|
25
|
+
toString: () => err,
|
|
26
|
+
write: (input) => {
|
|
27
|
+
err += input;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
stdout: {
|
|
31
|
+
toString: () => out,
|
|
32
|
+
write: (input) => {
|
|
33
|
+
out += input;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
describe('mark', () => {
|
|
39
|
+
describe('execute', () => {
|
|
40
|
+
const runCLI = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const cli = makeCLI();
|
|
42
|
+
const context = createMockContext();
|
|
43
|
+
process.env = {
|
|
44
|
+
DATADOG_API_KEY: 'PLACEHOLDER',
|
|
45
|
+
};
|
|
46
|
+
const code = yield cli.run(['deployment', 'mark'], context);
|
|
47
|
+
return { context, code };
|
|
48
|
+
});
|
|
49
|
+
test('should fail if not running in a supported provider', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
|
+
const { context, code } = yield runCLI();
|
|
51
|
+
expect(code).toBe(1);
|
|
52
|
+
expect(context.stdout.toString()).toStrictEqual('');
|
|
53
|
+
expect(context.stderr.toString()).toContain('Only providers [GitHub, GitLab, CircleCI, Buildkite, Jenkins, TeamCity, AzurePipelines] are supported');
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
describe('createDeploymentTags', () => {
|
|
57
|
+
test('should add is rollback if present', () => {
|
|
58
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
59
|
+
command['isRollback'] = true;
|
|
60
|
+
const expectedTags = ['datadog_cd_visibility.is_deployment:true', 'datadog_cd_visibility.is_rollback:true'];
|
|
61
|
+
expect(command.createJobDeploymentTags()).toEqual(expectedTags);
|
|
62
|
+
});
|
|
63
|
+
test('should add env if present', () => {
|
|
64
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
65
|
+
command['env'] = 'test';
|
|
66
|
+
const expectedTags = ['datadog_cd_visibility.is_deployment:true', 'datadog_cd_visibility.env:test'];
|
|
67
|
+
expect(command.createJobDeploymentTags()).toEqual(expectedTags);
|
|
68
|
+
});
|
|
69
|
+
test('should add revision if present', () => {
|
|
70
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
71
|
+
command['revision'] = '1.0.0';
|
|
72
|
+
const expectedTags = ['datadog_cd_visibility.is_deployment:true', 'datadog_cd_visibility.revision:1.0.0'];
|
|
73
|
+
expect(command.createJobDeploymentTags()).toEqual(expectedTags);
|
|
74
|
+
});
|
|
75
|
+
test('should add service if present', () => {
|
|
76
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
77
|
+
command['service'] = 'payment-service';
|
|
78
|
+
const expectedTags = ['datadog_cd_visibility.is_deployment:true', 'datadog_cd_visibility.service:payment-service'];
|
|
79
|
+
expect(command.createJobDeploymentTags()).toEqual(expectedTags);
|
|
80
|
+
});
|
|
81
|
+
test('should add custom tags if present', () => {
|
|
82
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
83
|
+
command['tags'] = ['team:backend', 'image:my_image'];
|
|
84
|
+
const expectedTags = [
|
|
85
|
+
'datadog_cd_visibility.is_deployment:true',
|
|
86
|
+
'datadog_cd_visibility.custom_tags:team:backend,image:my_image',
|
|
87
|
+
];
|
|
88
|
+
expect(command.createJobDeploymentTags()).toEqual(expectedTags);
|
|
89
|
+
});
|
|
90
|
+
test('should add contains deployment tag to pipeline', () => {
|
|
91
|
+
const command = (0, fixtures_1.createCommand)(mark_1.DeploymentMarkCommand);
|
|
92
|
+
const expectedPipelineTags = ['ci.pipeline.contains_deployment:true'];
|
|
93
|
+
expect(command.createPipelineDeploymentTags()).toEqual(expectedPipelineTags);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=mark.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.test.js","sourceRoot":"","sources":["../../../../src/commands/deployment/__tests__/mark.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAA6B;AAE7B,kEAAiE;AAEjE,kCAA6C;AAE7C,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,GAAG,GAAG,IAAI,eAAG,EAAE,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E,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACzC,MAAM,OAAO,GAAG,IAAA,wBAAa,EAAC,4BAAqB,CAAC,CAAA;YACpD,OAAO,CAAC,SAAS,CAAC,GAAG,iBAAiB,CAAA;YACtC,MAAM,YAAY,GAAG,CAAC,0CAA0C,EAAE,+CAA+C,CAAC,CAAA;YAClH,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;QACjE,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC7C,MAAM,OAAO,GAAG,IAAA,wBAAa,EAAC,4BAAqB,CAAC,CAAA;YACpD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;YACpD,MAAM,YAAY,GAAG;gBACnB,0CAA0C;gBAC1C,+DAA+D;aAChE,CAAA;YACD,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;QACjE,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;YAC1D,MAAM,OAAO,GAAG,IAAA,wBAAa,EAAC,4BAAqB,CAAC,CAAA;YACpD,MAAM,oBAAoB,GAAG,CAAC,sCAAsC,CAAC,CAAA;YACrE,MAAM,CAAC,OAAO,CAAC,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;QAC9E,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const advanced_1 = require("clipanion/lib/advanced");
|
|
36
|
+
const fixtures_1 = require("../../../helpers/__tests__/fixtures");
|
|
37
|
+
const gitFunctions = __importStar(require("../../../helpers/git/get-git-data"));
|
|
38
|
+
const deployment_1 = require("../deployment");
|
|
39
|
+
describe('deployment', () => {
|
|
40
|
+
describe('getApiHelper', () => {
|
|
41
|
+
test('should throw an error if API key is undefined', () => {
|
|
42
|
+
process.env = {};
|
|
43
|
+
const write = jest.fn();
|
|
44
|
+
const command = new deployment_1.SendDeploymentEvent();
|
|
45
|
+
command.context = { stdout: { write } };
|
|
46
|
+
expect(command['getApiHelper'].bind(command)).toThrow('API key is missing');
|
|
47
|
+
expect(write.mock.calls[0][0]).toContain('DD_API_KEY');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const makeCli = () => {
|
|
52
|
+
const cli = new advanced_1.Cli();
|
|
53
|
+
cli.register(deployment_1.SendDeploymentEvent);
|
|
54
|
+
return cli;
|
|
55
|
+
};
|
|
56
|
+
describe('execute', () => {
|
|
57
|
+
const runCLI = (extraArgs, extraEnv) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
+
const cli = makeCli();
|
|
59
|
+
const context = (0, fixtures_1.createMockContext)();
|
|
60
|
+
process.env = Object.assign({ DD_API_KEY: 'PLACEHOLDER' }, extraEnv);
|
|
61
|
+
context.env = process.env;
|
|
62
|
+
const code = yield cli.run(['dora', 'deployment', ...extraArgs], context);
|
|
63
|
+
return { context, code };
|
|
64
|
+
});
|
|
65
|
+
describe('dry-run', () => {
|
|
66
|
+
const fakeCurrentDate = new Date(1699960651000);
|
|
67
|
+
beforeAll(() => {
|
|
68
|
+
jest.useFakeTimers();
|
|
69
|
+
jest.setSystemTime(fakeCurrentDate);
|
|
70
|
+
});
|
|
71
|
+
afterAll(() => {
|
|
72
|
+
jest.useRealTimers();
|
|
73
|
+
});
|
|
74
|
+
test('with all parameters provided', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
/* eslint-disable prettier/prettier */
|
|
76
|
+
const { context, code } = yield runCLI([
|
|
77
|
+
'--dry-run',
|
|
78
|
+
'--service', 'test-service',
|
|
79
|
+
'--started-at', '1699960648',
|
|
80
|
+
'--finished-at', '1699960650',
|
|
81
|
+
'--env', 'test',
|
|
82
|
+
'--git-repository-url', 'https://github.com/DataDog/datadog-ci',
|
|
83
|
+
'--git-commit-sha', '2186e1b0ab2a87e312a8c831d5bc947fa081d4f9',
|
|
84
|
+
]);
|
|
85
|
+
/* eslint-enable prettier/prettier */
|
|
86
|
+
expect(code).toBe(0);
|
|
87
|
+
checkDryRunConsoleOutput(context.stdout, {
|
|
88
|
+
service: 'test-service',
|
|
89
|
+
startedAt: new Date(1699960648000),
|
|
90
|
+
finishedAt: new Date(1699960650000),
|
|
91
|
+
env: 'test',
|
|
92
|
+
git: {
|
|
93
|
+
repoURL: 'https://github.com/DataDog/datadog-ci',
|
|
94
|
+
commitSHA: '2186e1b0ab2a87e312a8c831d5bc947fa081d4f9',
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}));
|
|
98
|
+
test('with minimal parameters provided', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
+
/* eslint-disable prettier/prettier */
|
|
100
|
+
const { context, code } = yield runCLI([
|
|
101
|
+
'--dry-run',
|
|
102
|
+
'--skip-git',
|
|
103
|
+
'--service', 'test-service',
|
|
104
|
+
'--started-at', '1699960648',
|
|
105
|
+
]);
|
|
106
|
+
/* eslint-enable prettier/prettier */
|
|
107
|
+
expect(code).toBe(0);
|
|
108
|
+
checkDryRunConsoleOutput(context.stdout, {
|
|
109
|
+
service: 'test-service',
|
|
110
|
+
startedAt: new Date(1699960648000),
|
|
111
|
+
finishedAt: fakeCurrentDate,
|
|
112
|
+
});
|
|
113
|
+
}));
|
|
114
|
+
test('with parameters from env', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
115
|
+
const envVars = {
|
|
116
|
+
DD_SERVICE: 'different-test-service',
|
|
117
|
+
DD_ENV: 'test-env',
|
|
118
|
+
};
|
|
119
|
+
/* eslint-disable prettier/prettier */
|
|
120
|
+
const { context, code } = yield runCLI([
|
|
121
|
+
'--dry-run',
|
|
122
|
+
'--skip-git',
|
|
123
|
+
'--started-at', '1699960648',
|
|
124
|
+
], envVars);
|
|
125
|
+
/* eslint-enable prettier/prettier */
|
|
126
|
+
expect(code).toBe(0);
|
|
127
|
+
checkDryRunConsoleOutput(context.stdout, {
|
|
128
|
+
service: envVars.DD_SERVICE,
|
|
129
|
+
startedAt: new Date(1699960648000),
|
|
130
|
+
finishedAt: fakeCurrentDate,
|
|
131
|
+
env: envVars.DD_ENV,
|
|
132
|
+
});
|
|
133
|
+
}));
|
|
134
|
+
test('with automatic git info', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
135
|
+
const mockGitRepositoryURL = jest.spyOn(gitFunctions, 'gitRepositoryURL');
|
|
136
|
+
const mockGitHash = jest.spyOn(gitFunctions, 'gitHash');
|
|
137
|
+
const gitInfo = {
|
|
138
|
+
repoURL: 'https://github.com/DataDog/datadog-ci',
|
|
139
|
+
commitSHA: '2186e1b0ab2a87e312a8c831d5bc947fa081d4f9',
|
|
140
|
+
};
|
|
141
|
+
mockGitRepositoryURL.mockResolvedValue(gitInfo.repoURL);
|
|
142
|
+
mockGitHash.mockResolvedValue(gitInfo.commitSHA);
|
|
143
|
+
/* eslint-disable prettier/prettier */
|
|
144
|
+
const { context, code } = yield runCLI([
|
|
145
|
+
'--dry-run',
|
|
146
|
+
'--service', 'test-service',
|
|
147
|
+
'--started-at', '1699960648',
|
|
148
|
+
]);
|
|
149
|
+
/* eslint-enable prettier/prettier */
|
|
150
|
+
expect(code).toBe(0);
|
|
151
|
+
expect(mockGitRepositoryURL).toHaveBeenCalled();
|
|
152
|
+
expect(mockGitHash).toHaveBeenCalled();
|
|
153
|
+
checkDryRunConsoleOutput(context.stdout, {
|
|
154
|
+
service: 'test-service',
|
|
155
|
+
startedAt: new Date(1699960648000),
|
|
156
|
+
finishedAt: fakeCurrentDate,
|
|
157
|
+
git: gitInfo,
|
|
158
|
+
});
|
|
159
|
+
}));
|
|
160
|
+
test('service is required', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
161
|
+
/* eslint-disable prettier/prettier */
|
|
162
|
+
const { context, code } = yield runCLI([
|
|
163
|
+
'--dry-run',
|
|
164
|
+
'--skip-git',
|
|
165
|
+
'--started-at', '1699960648',
|
|
166
|
+
]);
|
|
167
|
+
/* eslint-enable prettier/prettier */
|
|
168
|
+
expect(code).not.toBe(0);
|
|
169
|
+
expect(context.stdout.toString()).toContain('--service');
|
|
170
|
+
}));
|
|
171
|
+
test('started-at is required', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
172
|
+
/* eslint-disable prettier/prettier */
|
|
173
|
+
const { context, code } = yield runCLI([
|
|
174
|
+
'--dry-run',
|
|
175
|
+
'--skip-git',
|
|
176
|
+
'--service', 'test-service',
|
|
177
|
+
]);
|
|
178
|
+
/* eslint-enable prettier/prettier */
|
|
179
|
+
expect(code).not.toBe(0);
|
|
180
|
+
expect(context.stdout.toString()).toContain('--started-at');
|
|
181
|
+
}));
|
|
182
|
+
test('started-at after finished-at is rejected', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
183
|
+
/* eslint-disable prettier/prettier */
|
|
184
|
+
const { context, code } = yield runCLI([
|
|
185
|
+
'--dry-run',
|
|
186
|
+
'--skip-git',
|
|
187
|
+
'--service', 'test-service',
|
|
188
|
+
'--started-at', '2099-11-14T11:17:28Z',
|
|
189
|
+
]);
|
|
190
|
+
/* eslint-enable prettier/prettier */
|
|
191
|
+
expect(code).not.toBe(0);
|
|
192
|
+
expect(context.stdout.toString()).toContain('--started-at');
|
|
193
|
+
}));
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
const checkDryRunConsoleOutput = (output, expectedDeployment) => {
|
|
197
|
+
const text = output.toString();
|
|
198
|
+
expect(text).toContain('DRYRUN');
|
|
199
|
+
expect(text).toContain(JSON.stringify(expectedDeployment, undefined, 2));
|
|
200
|
+
};
|
|
201
|
+
//# sourceMappingURL=deployment.test.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