@datadog/datadog-ci 2.40.0 → 2.40.2

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 (271) hide show
  1. package/dist/__tests__/cli.test.d.ts +1 -0
  2. package/dist/__tests__/cli.test.js +41 -0
  3. package/dist/__tests__/cli.test.js.map +1 -0
  4. package/dist/commands/cloud-run/__tests__/fixtures.d.ts +2 -0
  5. package/dist/commands/cloud-run/__tests__/fixtures.js +12 -0
  6. package/dist/commands/cloud-run/__tests__/fixtures.js.map +1 -0
  7. package/dist/commands/cloud-run/__tests__/flare.test.d.ts +1 -0
  8. package/dist/commands/cloud-run/__tests__/flare.test.js +557 -0
  9. package/dist/commands/cloud-run/__tests__/flare.test.js.map +1 -0
  10. package/dist/commands/deployment/__tests__/mark.test.d.ts +1 -0
  11. package/dist/commands/deployment/__tests__/mark.test.js +47 -0
  12. package/dist/commands/deployment/__tests__/mark.test.js.map +1 -0
  13. package/dist/commands/dora/__tests__/deployment.test.d.ts +1 -0
  14. package/dist/commands/dora/__tests__/deployment.test.js +201 -0
  15. package/dist/commands/dora/__tests__/deployment.test.js.map +1 -0
  16. package/dist/commands/dsyms/__tests__/upload.test.d.ts +1 -0
  17. package/dist/commands/dsyms/__tests__/upload.test.js +346 -0
  18. package/dist/commands/dsyms/__tests__/upload.test.js.map +1 -0
  19. package/dist/commands/dsyms/__tests__/utils.test.d.ts +1 -0
  20. package/dist/commands/dsyms/__tests__/utils.test.js +100 -0
  21. package/dist/commands/dsyms/__tests__/utils.test.js.map +1 -0
  22. package/dist/commands/dsyms/upload.js +3 -3
  23. package/dist/commands/dsyms/upload.js.map +1 -1
  24. package/dist/commands/dsyms/utils.js +4 -2
  25. package/dist/commands/dsyms/utils.js.map +1 -1
  26. package/dist/commands/elf-symbols/__tests__/elf.test.d.ts +1 -0
  27. package/dist/commands/elf-symbols/__tests__/elf.test.js +813 -0
  28. package/dist/commands/elf-symbols/__tests__/elf.test.js.map +1 -0
  29. package/dist/commands/elf-symbols/__tests__/upload.test.d.ts +1 -0
  30. package/dist/commands/elf-symbols/__tests__/upload.test.js +249 -0
  31. package/dist/commands/elf-symbols/__tests__/upload.test.js.map +1 -0
  32. package/dist/commands/elf-symbols/upload.js +2 -3
  33. package/dist/commands/elf-symbols/upload.js.map +1 -1
  34. package/dist/commands/flutter-symbols/__tests__/upload.test.d.ts +1 -0
  35. package/dist/commands/flutter-symbols/__tests__/upload.test.js +617 -0
  36. package/dist/commands/flutter-symbols/__tests__/upload.test.js.map +1 -0
  37. package/dist/commands/flutter-symbols/upload.js +2 -2
  38. package/dist/commands/flutter-symbols/upload.js.map +1 -1
  39. package/dist/commands/gate/__tests__/evaluate.test.d.ts +1 -0
  40. package/dist/commands/gate/__tests__/evaluate.test.js +398 -0
  41. package/dist/commands/gate/__tests__/evaluate.test.js.map +1 -0
  42. package/dist/commands/gate/__tests__/scope.test.d.ts +1 -0
  43. package/dist/commands/gate/__tests__/scope.test.js +29 -0
  44. package/dist/commands/gate/__tests__/scope.test.js.map +1 -0
  45. package/dist/commands/git-metadata/__tests__/git.test.d.ts +1 -0
  46. package/dist/commands/git-metadata/__tests__/git.test.js +132 -0
  47. package/dist/commands/git-metadata/__tests__/git.test.js.map +1 -0
  48. package/dist/commands/git-metadata/__tests__/gitdb.test.d.ts +1 -0
  49. package/dist/commands/git-metadata/__tests__/gitdb.test.js +1386 -0
  50. package/dist/commands/git-metadata/__tests__/gitdb.test.js.map +1 -0
  51. package/dist/commands/git-metadata/__tests__/library.test.d.ts +1 -0
  52. package/dist/commands/git-metadata/__tests__/library.test.js +118 -0
  53. package/dist/commands/git-metadata/__tests__/library.test.js.map +1 -0
  54. package/dist/commands/git-metadata/__tests__/upload.test.d.ts +1 -0
  55. package/dist/commands/git-metadata/__tests__/upload.test.js +52 -0
  56. package/dist/commands/git-metadata/__tests__/upload.test.js.map +1 -0
  57. package/dist/commands/junit/__tests__/id.test.d.ts +1 -0
  58. package/dist/commands/junit/__tests__/id.test.js +24 -0
  59. package/dist/commands/junit/__tests__/id.test.js.map +1 -0
  60. package/dist/commands/junit/__tests__/upload.test.d.ts +1 -0
  61. package/dist/commands/junit/__tests__/upload.test.js +495 -0
  62. package/dist/commands/junit/__tests__/upload.test.js.map +1 -0
  63. package/dist/commands/junit/upload.js +5 -3
  64. package/dist/commands/junit/upload.js.map +1 -1
  65. package/dist/commands/lambda/__tests__/fixtures.d.ts +51 -0
  66. package/dist/commands/lambda/__tests__/fixtures.js +146 -0
  67. package/dist/commands/lambda/__tests__/fixtures.js.map +1 -0
  68. package/dist/commands/lambda/__tests__/flare.test.d.ts +1 -0
  69. package/dist/commands/lambda/__tests__/flare.test.js +730 -0
  70. package/dist/commands/lambda/__tests__/flare.test.js.map +1 -0
  71. package/dist/commands/lambda/__tests__/functions/commons.test.d.ts +1 -0
  72. package/dist/commands/lambda/__tests__/functions/commons.test.js +791 -0
  73. package/dist/commands/lambda/__tests__/functions/commons.test.js.map +1 -0
  74. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.d.ts +1 -0
  75. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js +386 -0
  76. package/dist/commands/lambda/__tests__/functions/instrument.part1.test.js.map +1 -0
  77. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.d.ts +1 -0
  78. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js +721 -0
  79. package/dist/commands/lambda/__tests__/functions/instrument.part2.test.js.map +1 -0
  80. package/dist/commands/lambda/__tests__/functions/uninstrument.test.d.ts +1 -0
  81. package/dist/commands/lambda/__tests__/functions/uninstrument.test.js +513 -0
  82. package/dist/commands/lambda/__tests__/functions/uninstrument.test.js.map +1 -0
  83. package/dist/commands/lambda/__tests__/functions/versionChecker.test.d.ts +1 -0
  84. package/dist/commands/lambda/__tests__/functions/versionChecker.test.js +33 -0
  85. package/dist/commands/lambda/__tests__/functions/versionChecker.test.js.map +1 -0
  86. package/dist/commands/lambda/__tests__/instrument.test.d.ts +1 -0
  87. package/dist/commands/lambda/__tests__/instrument.test.js +1511 -0
  88. package/dist/commands/lambda/__tests__/instrument.test.js.map +1 -0
  89. package/dist/commands/lambda/__tests__/loggroup.test.d.ts +1 -0
  90. package/dist/commands/lambda/__tests__/loggroup.test.js +340 -0
  91. package/dist/commands/lambda/__tests__/loggroup.test.js.map +1 -0
  92. package/dist/commands/lambda/__tests__/prompt.test.d.ts +1 -0
  93. package/dist/commands/lambda/__tests__/prompt.test.js +206 -0
  94. package/dist/commands/lambda/__tests__/prompt.test.js.map +1 -0
  95. package/dist/commands/lambda/__tests__/tags.test.d.ts +1 -0
  96. package/dist/commands/lambda/__tests__/tags.test.js +305 -0
  97. package/dist/commands/lambda/__tests__/tags.test.js.map +1 -0
  98. package/dist/commands/lambda/__tests__/uninstrument.test.d.ts +1 -0
  99. package/dist/commands/lambda/__tests__/uninstrument.test.js +722 -0
  100. package/dist/commands/lambda/__tests__/uninstrument.test.js.map +1 -0
  101. package/dist/commands/measure/__tests__/measure.test.d.ts +1 -0
  102. package/dist/commands/measure/__tests__/measure.test.js +110 -0
  103. package/dist/commands/measure/__tests__/measure.test.js.map +1 -0
  104. package/dist/commands/react-native/__tests__/codepush.test.d.ts +1 -0
  105. package/dist/commands/react-native/__tests__/codepush.test.js +161 -0
  106. package/dist/commands/react-native/__tests__/codepush.test.js.map +1 -0
  107. package/dist/commands/react-native/__tests__/interfaces.test.d.ts +1 -0
  108. package/dist/commands/react-native/__tests__/interfaces.test.js +33 -0
  109. package/dist/commands/react-native/__tests__/interfaces.test.js.map +1 -0
  110. package/dist/commands/react-native/__tests__/upload.test.d.ts +1 -0
  111. package/dist/commands/react-native/__tests__/upload.test.js +238 -0
  112. package/dist/commands/react-native/__tests__/upload.test.js.map +1 -0
  113. package/dist/commands/react-native/__tests__/utils.test.d.ts +1 -0
  114. package/dist/commands/react-native/__tests__/utils.test.js +27 -0
  115. package/dist/commands/react-native/__tests__/utils.test.js.map +1 -0
  116. package/dist/commands/react-native/__tests__/xcode.test.d.ts +1 -0
  117. package/dist/commands/react-native/__tests__/xcode.test.js +465 -0
  118. package/dist/commands/react-native/__tests__/xcode.test.js.map +1 -0
  119. package/dist/commands/sarif/__tests__/upload.test.d.ts +1 -0
  120. package/dist/commands/sarif/__tests__/upload.test.js +228 -0
  121. package/dist/commands/sarif/__tests__/upload.test.js.map +1 -0
  122. package/dist/commands/sarif/upload.js +2 -2
  123. package/dist/commands/sarif/upload.js.map +1 -1
  124. package/dist/commands/sbom/__tests__/payload.test.d.ts +1 -0
  125. package/dist/commands/sbom/__tests__/payload.test.js +262 -0
  126. package/dist/commands/sbom/__tests__/payload.test.js.map +1 -0
  127. package/dist/commands/sbom/__tests__/validation.test.d.ts +1 -0
  128. package/dist/commands/sbom/__tests__/validation.test.js +41 -0
  129. package/dist/commands/sbom/__tests__/validation.test.js.map +1 -0
  130. package/dist/commands/sourcemaps/__tests__/upload.test.d.ts +1 -0
  131. package/dist/commands/sourcemaps/__tests__/upload.test.js +270 -0
  132. package/dist/commands/sourcemaps/__tests__/upload.test.js.map +1 -0
  133. package/dist/commands/sourcemaps/__tests__/utils.test.d.ts +1 -0
  134. package/dist/commands/sourcemaps/__tests__/utils.test.js +31 -0
  135. package/dist/commands/sourcemaps/__tests__/utils.test.js.map +1 -0
  136. package/dist/commands/sourcemaps/upload.js +2 -2
  137. package/dist/commands/sourcemaps/upload.js.map +1 -1
  138. package/dist/commands/stepfunctions/__tests__/awsCommands.test.d.ts +1 -0
  139. package/dist/commands/stepfunctions/__tests__/awsCommands.test.js +192 -0
  140. package/dist/commands/stepfunctions/__tests__/awsCommands.test.js.map +1 -0
  141. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.d.ts +6 -0
  142. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js +45 -0
  143. package/dist/commands/stepfunctions/__tests__/fixtures/aws-resources.js.map +1 -0
  144. package/dist/commands/stepfunctions/__tests__/fixtures/cli.d.ts +5 -0
  145. package/dist/commands/stepfunctions/__tests__/fixtures/cli.js +19 -0
  146. package/dist/commands/stepfunctions/__tests__/fixtures/cli.js.map +1 -0
  147. package/dist/commands/stepfunctions/__tests__/helpers.test.d.ts +1 -0
  148. package/dist/commands/stepfunctions/__tests__/helpers.test.js +205 -0
  149. package/dist/commands/stepfunctions/__tests__/helpers.test.js.map +1 -0
  150. package/dist/commands/stepfunctions/__tests__/instrument.test.d.ts +1 -0
  151. package/dist/commands/stepfunctions/__tests__/instrument.test.js +431 -0
  152. package/dist/commands/stepfunctions/__tests__/instrument.test.js.map +1 -0
  153. package/dist/commands/stepfunctions/__tests__/uninstrument.test.d.ts +1 -0
  154. package/dist/commands/stepfunctions/__tests__/uninstrument.test.js +166 -0
  155. package/dist/commands/stepfunctions/__tests__/uninstrument.test.js.map +1 -0
  156. package/dist/commands/synthetics/__tests__/api.test.d.ts +1 -0
  157. package/dist/commands/synthetics/__tests__/api.test.js +422 -0
  158. package/dist/commands/synthetics/__tests__/api.test.js.map +1 -0
  159. package/dist/commands/synthetics/__tests__/cli.test.d.ts +1 -0
  160. package/dist/commands/synthetics/__tests__/cli.test.js +1325 -0
  161. package/dist/commands/synthetics/__tests__/cli.test.js.map +1 -0
  162. package/dist/commands/synthetics/__tests__/fixtures.d.ts +149 -0
  163. package/dist/commands/synthetics/__tests__/fixtures.js +507 -0
  164. package/dist/commands/synthetics/__tests__/fixtures.js.map +1 -0
  165. package/dist/commands/synthetics/__tests__/mobile.test.d.ts +1 -0
  166. package/dist/commands/synthetics/__tests__/mobile.test.js +376 -0
  167. package/dist/commands/synthetics/__tests__/mobile.test.js.map +1 -0
  168. package/dist/commands/synthetics/__tests__/reporters/default.test.d.ts +1 -0
  169. package/dist/commands/synthetics/__tests__/reporters/default.test.js +354 -0
  170. package/dist/commands/synthetics/__tests__/reporters/default.test.js.map +1 -0
  171. package/dist/commands/synthetics/__tests__/reporters/junit.test.d.ts +1 -0
  172. package/dist/commands/synthetics/__tests__/reporters/junit.test.js +353 -0
  173. package/dist/commands/synthetics/__tests__/reporters/junit.test.js.map +1 -0
  174. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.d.ts +1 -0
  175. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js +232 -0
  176. package/dist/commands/synthetics/__tests__/reporters/mobile/app-upload.test.js.map +1 -0
  177. package/dist/commands/synthetics/__tests__/run-tests-lib.test.d.ts +1 -0
  178. package/dist/commands/synthetics/__tests__/run-tests-lib.test.js +735 -0
  179. package/dist/commands/synthetics/__tests__/run-tests-lib.test.js.map +1 -0
  180. package/dist/commands/synthetics/__tests__/test.test.d.ts +1 -0
  181. package/dist/commands/synthetics/__tests__/test.test.js +33 -0
  182. package/dist/commands/synthetics/__tests__/test.test.js.map +1 -0
  183. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.d.ts +1 -0
  184. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js +21 -0
  185. package/dist/commands/synthetics/__tests__/tunnel/crypto.test.js.map +1 -0
  186. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.d.ts +1 -0
  187. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js +80 -0
  188. package/dist/commands/synthetics/__tests__/tunnel/tunnel.test.js.map +1 -0
  189. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.d.ts +1 -0
  190. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js +109 -0
  191. package/dist/commands/synthetics/__tests__/tunnel/websocket.test.js.map +1 -0
  192. package/dist/commands/synthetics/__tests__/utils/internal.test.d.ts +1 -0
  193. package/dist/commands/synthetics/__tests__/utils/internal.test.js +186 -0
  194. package/dist/commands/synthetics/__tests__/utils/internal.test.js.map +1 -0
  195. package/dist/commands/synthetics/__tests__/utils/public.test.d.ts +1 -0
  196. package/dist/commands/synthetics/__tests__/utils/public.test.js +1526 -0
  197. package/dist/commands/synthetics/__tests__/utils/public.test.js.map +1 -0
  198. package/dist/commands/synthetics/api.d.ts +1 -1
  199. package/dist/commands/synthetics/api.js +10 -5
  200. package/dist/commands/synthetics/api.js.map +1 -1
  201. package/dist/commands/synthetics/run-tests-command.d.ts +1 -0
  202. package/dist/commands/synthetics/run-tests-command.js +3 -2
  203. package/dist/commands/synthetics/run-tests-command.js.map +1 -1
  204. package/dist/commands/synthetics/run-tests-lib.js +0 -4
  205. package/dist/commands/synthetics/run-tests-lib.js.map +1 -1
  206. package/dist/commands/synthetics/test.js +9 -1
  207. package/dist/commands/synthetics/test.js.map +1 -1
  208. package/dist/commands/synthetics/utils/public.js +3 -3
  209. package/dist/commands/synthetics/utils/public.js.map +1 -1
  210. package/dist/commands/tag/__tests__/tag.test.d.ts +1 -0
  211. package/dist/commands/tag/__tests__/tag.test.js +75 -0
  212. package/dist/commands/tag/__tests__/tag.test.js.map +1 -0
  213. package/dist/commands/trace/__tests__/trace.test.d.ts +1 -0
  214. package/dist/commands/trace/__tests__/trace.test.js +145 -0
  215. package/dist/commands/trace/__tests__/trace.test.js.map +1 -0
  216. package/dist/commands/trace/trace.js +1 -1
  217. package/dist/commands/trace/trace.js.map +1 -1
  218. package/dist/commands/unity-symbols/__tests__/upload.test.d.ts +1 -0
  219. package/dist/commands/unity-symbols/__tests__/upload.test.js +369 -0
  220. package/dist/commands/unity-symbols/__tests__/upload.test.js.map +1 -0
  221. package/dist/commands/unity-symbols/upload.js +2 -2
  222. package/dist/commands/unity-symbols/upload.js.map +1 -1
  223. package/dist/helpers/__tests__/app.test.d.ts +1 -0
  224. package/dist/helpers/__tests__/app.test.js +31 -0
  225. package/dist/helpers/__tests__/app.test.js.map +1 -0
  226. package/dist/helpers/__tests__/ci.test.d.ts +1 -0
  227. package/dist/helpers/__tests__/ci.test.js +252 -0
  228. package/dist/helpers/__tests__/ci.test.js.map +1 -0
  229. package/dist/helpers/__tests__/fixtures.d.ts +33 -0
  230. package/dist/helpers/__tests__/fixtures.js +71 -0
  231. package/dist/helpers/__tests__/fixtures.js.map +1 -0
  232. package/dist/helpers/__tests__/flare.test.d.ts +1 -0
  233. package/dist/helpers/__tests__/flare.test.js +226 -0
  234. package/dist/helpers/__tests__/flare.test.js.map +1 -0
  235. package/dist/helpers/__tests__/fs.test.d.ts +1 -0
  236. package/dist/helpers/__tests__/fs.test.js +189 -0
  237. package/dist/helpers/__tests__/fs.test.js.map +1 -0
  238. package/dist/helpers/__tests__/plist.test.d.ts +1 -0
  239. package/dist/helpers/__tests__/plist.test.js +43 -0
  240. package/dist/helpers/__tests__/plist.test.js.map +1 -0
  241. package/dist/helpers/__tests__/prompt.test.d.ts +1 -0
  242. package/dist/helpers/__tests__/prompt.test.js +71 -0
  243. package/dist/helpers/__tests__/prompt.test.js.map +1 -0
  244. package/dist/helpers/__tests__/retry.test.d.ts +1 -0
  245. package/dist/helpers/__tests__/retry.test.js +99 -0
  246. package/dist/helpers/__tests__/retry.test.js.map +1 -0
  247. package/dist/helpers/__tests__/tags.test.d.ts +1 -0
  248. package/dist/helpers/__tests__/tags.test.js +71 -0
  249. package/dist/helpers/__tests__/tags.test.js.map +1 -0
  250. package/dist/helpers/__tests__/upload.test.d.ts +1 -0
  251. package/dist/helpers/__tests__/upload.test.js +231 -0
  252. package/dist/helpers/__tests__/upload.test.js.map +1 -0
  253. package/dist/helpers/__tests__/user-provided-git.test.d.ts +1 -0
  254. package/dist/helpers/__tests__/user-provided-git.test.js +119 -0
  255. package/dist/helpers/__tests__/user-provided-git.test.js.map +1 -0
  256. package/dist/helpers/__tests__/utils.test.d.ts +1 -0
  257. package/dist/helpers/__tests__/utils.test.js +429 -0
  258. package/dist/helpers/__tests__/utils.test.js.map +1 -0
  259. package/dist/helpers/__tests__/validation.test.d.ts +1 -0
  260. package/dist/helpers/__tests__/validation.test.js +25 -0
  261. package/dist/helpers/__tests__/validation.test.js.map +1 -0
  262. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.d.ts +1 -0
  263. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js +103 -0
  264. package/dist/helpers/git/__tests__/format-git-sourcemaps-data.test.js.map +1 -0
  265. package/dist/helpers/git/__tests__/format-git-span-data.test.d.ts +1 -0
  266. package/dist/helpers/git/__tests__/format-git-span-data.test.js +121 -0
  267. package/dist/helpers/git/__tests__/format-git-span-data.test.js.map +1 -0
  268. package/dist/helpers/git/__tests__/get-git-data.test.d.ts +1 -0
  269. package/dist/helpers/git/__tests__/get-git-data.test.js +72 -0
  270. package/dist/helpers/git/__tests__/get-git-data.test.js.map +1 -0
  271. package/package.json +4 -6
@@ -0,0 +1,192 @@
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 client_cloudwatch_logs_1 = require("@aws-sdk/client-cloudwatch-logs");
13
+ const client_iam_1 = require("@aws-sdk/client-iam");
14
+ const client_sfn_1 = require("@aws-sdk/client-sfn");
15
+ const aws_sdk_client_mock_1 = require("aws-sdk-client-mock");
16
+ const fixtures_1 = require("../../../helpers/__tests__/fixtures");
17
+ const awsCommands_1 = require("../awsCommands");
18
+ const helpers_1 = require("../helpers");
19
+ describe('awsCommands test', () => {
20
+ const expectedResp = { fakeKey: 'fakeValue' };
21
+ const fakeForwarderArn = 'fakeForwarderArn';
22
+ const fakeFilterName = 'fakeFilterName';
23
+ const fakeLogGroupName = 'fakeLogGroupName';
24
+ const fakeLogGroupArn = 'fakeLogGroupArn';
25
+ const fakeStepFunctionArn = 'arn:aws:states:sa-east-1:1234567890:stateMachine:UnitTestStateMachineName';
26
+ const fakeStateMachineName = 'UnitTestStateMachineName';
27
+ const fakeAccountId = '123456789012';
28
+ const fakeRoleArn = `arn:aws:iam::${fakeAccountId}:role/unit-test-fake-role-name`;
29
+ const mockedCloudWatchLogsClient = (0, aws_sdk_client_mock_1.mockClient)(client_cloudwatch_logs_1.CloudWatchLogsClient);
30
+ const mockedIamClient = (0, aws_sdk_client_mock_1.mockClient)(client_iam_1.IAMClient);
31
+ const mockedStepFunctionsClient = (0, aws_sdk_client_mock_1.mockClient)(client_sfn_1.SFNClient);
32
+ let describeStateMachineCommandOutput;
33
+ let mockedContext;
34
+ beforeEach(() => {
35
+ mockedStepFunctionsClient.reset();
36
+ mockedCloudWatchLogsClient.reset();
37
+ mockedIamClient.reset();
38
+ jest.resetModules();
39
+ process.env = {};
40
+ mockedContext = (0, fixtures_1.createMockContext)();
41
+ describeStateMachineCommandOutput = {
42
+ $metadata: {},
43
+ creationDate: undefined,
44
+ definition: undefined,
45
+ roleArn: undefined,
46
+ type: undefined,
47
+ stateMachineArn: fakeStepFunctionArn,
48
+ name: fakeStateMachineName,
49
+ };
50
+ });
51
+ test('listTagsForResource test', () => __awaiter(void 0, void 0, void 0, function* () {
52
+ mockedStepFunctionsClient.on(client_sfn_1.ListTagsForResourceCommand, { resourceArn: fakeStepFunctionArn }).resolves(expectedResp);
53
+ const actual = yield (0, awsCommands_1.listTagsForResource)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn);
54
+ expect(actual).toEqual(expectedResp);
55
+ }));
56
+ test('putSubscriptionFilter test', () => __awaiter(void 0, void 0, void 0, function* () {
57
+ const input = {
58
+ destinationArn: fakeForwarderArn,
59
+ filterName: fakeFilterName,
60
+ filterPattern: '',
61
+ logGroupName: fakeLogGroupName,
62
+ };
63
+ mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.PutSubscriptionFilterCommand, input).resolves(expectedResp);
64
+ const actual = yield (0, awsCommands_1.putSubscriptionFilter)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeForwarderArn, fakeFilterName, fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
65
+ expect(actual).toEqual(expectedResp);
66
+ }));
67
+ test('tagResource test', () => __awaiter(void 0, void 0, void 0, function* () {
68
+ const fakeTags = [{ key: 'key1', val: 'val1' }];
69
+ const input = {
70
+ resourceArn: fakeStepFunctionArn,
71
+ tags: fakeTags,
72
+ };
73
+ mockedStepFunctionsClient.on(client_sfn_1.TagResourceCommand, input).resolves(expectedResp);
74
+ const actual = yield (0, awsCommands_1.tagResource)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn, fakeTags, mockedContext, false);
75
+ expect(actual).toEqual(expectedResp);
76
+ }));
77
+ test('createLogGroup test', () => __awaiter(void 0, void 0, void 0, function* () {
78
+ const input = { logGroupName: fakeLogGroupName };
79
+ mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.CreateLogGroupCommand, input).resolves(expectedResp);
80
+ const actual = yield (0, awsCommands_1.createLogGroup)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
81
+ expect(actual).toEqual(expectedResp);
82
+ }));
83
+ test('deleteSubscriptionFilter test', () => __awaiter(void 0, void 0, void 0, function* () {
84
+ const input = {
85
+ filterName: fakeFilterName,
86
+ logGroupName: fakeLogGroupName,
87
+ };
88
+ mockedCloudWatchLogsClient.on(client_cloudwatch_logs_1.DeleteSubscriptionFilterCommand, input).resolves(expectedResp);
89
+ const actual = yield (0, awsCommands_1.deleteSubscriptionFilter)(new client_cloudwatch_logs_1.CloudWatchLogsClient({}), fakeFilterName, fakeLogGroupName, fakeStepFunctionArn, mockedContext, false);
90
+ expect(actual).toEqual(expectedResp);
91
+ }));
92
+ test('createLogsAccessPolicy test', () => __awaiter(void 0, void 0, void 0, function* () {
93
+ describeStateMachineCommandOutput = {
94
+ $metadata: {},
95
+ creationDate: undefined,
96
+ definition: undefined,
97
+ roleArn: undefined,
98
+ type: undefined,
99
+ stateMachineArn: fakeStepFunctionArn,
100
+ name: fakeStateMachineName,
101
+ };
102
+ const logsAccessPolicy = {
103
+ Version: '2012-10-17',
104
+ Statement: [
105
+ {
106
+ Effect: 'Allow',
107
+ Action: [
108
+ 'logs:CreateLogDelivery',
109
+ 'logs:CreateLogStream',
110
+ 'logs:GetLogDelivery',
111
+ 'logs:UpdateLogDelivery',
112
+ 'logs:DeleteLogDelivery',
113
+ 'logs:ListLogDeliveries',
114
+ 'logs:PutLogEvents',
115
+ 'logs:PutResourcePolicy',
116
+ 'logs:DescribeResourcePolicies',
117
+ 'logs:DescribeLogGroups',
118
+ ],
119
+ Resource: '*',
120
+ },
121
+ ],
122
+ };
123
+ const input = {
124
+ PolicyDocument: JSON.stringify(logsAccessPolicy),
125
+ PolicyName: (0, helpers_1.buildLogAccessPolicyName)(describeStateMachineCommandOutput),
126
+ };
127
+ mockedIamClient.on(client_iam_1.CreatePolicyCommand, input).resolves(expectedResp);
128
+ const actual = yield (0, awsCommands_1.createLogsAccessPolicy)(new client_iam_1.IAMClient({}), describeStateMachineCommandOutput, fakeStepFunctionArn, mockedContext, false);
129
+ expect(actual).toEqual(expectedResp);
130
+ }));
131
+ test('attachPolicyToStateMachineIamRole test', () => __awaiter(void 0, void 0, void 0, function* () {
132
+ describeStateMachineCommandOutput = {
133
+ $metadata: {},
134
+ creationDate: undefined,
135
+ definition: undefined,
136
+ roleArn: fakeRoleArn,
137
+ type: undefined,
138
+ stateMachineArn: fakeStepFunctionArn,
139
+ name: fakeStateMachineName,
140
+ };
141
+ const input = {
142
+ PolicyArn: `arn:aws:iam::${fakeAccountId}:policy/LogsDeliveryAccessPolicy-${fakeStateMachineName}`,
143
+ RoleName: 'unit-test-fake-role-name',
144
+ };
145
+ mockedIamClient.on(client_iam_1.AttachRolePolicyCommand, input).resolves(expectedResp);
146
+ const actual = yield (0, awsCommands_1.attachPolicyToStateMachineIamRole)(new client_iam_1.IAMClient({}), describeStateMachineCommandOutput, fakeAccountId, fakeStepFunctionArn, mockedContext, false);
147
+ expect(actual).toEqual(expectedResp);
148
+ }));
149
+ test('enableStepFunctionLogs test', () => __awaiter(void 0, void 0, void 0, function* () {
150
+ const input = {
151
+ stateMachineArn: fakeStepFunctionArn,
152
+ loggingConfiguration: {
153
+ destinations: [{ cloudWatchLogsLogGroup: { logGroupArn: fakeLogGroupArn } }],
154
+ level: client_sfn_1.LogLevel.ALL,
155
+ includeExecutionData: true,
156
+ },
157
+ };
158
+ mockedStepFunctionsClient.on(client_sfn_1.UpdateStateMachineCommand, input).resolves(expectedResp);
159
+ const actual = yield (0, awsCommands_1.enableStepFunctionLogs)(new client_sfn_1.SFNClient({}), describeStateMachineCommandOutput, fakeLogGroupArn, fakeStepFunctionArn, mockedContext, false);
160
+ expect(actual).toEqual(expectedResp);
161
+ }));
162
+ test('updateStateMachineDefinition test', () => __awaiter(void 0, void 0, void 0, function* () {
163
+ const definitionObj = {
164
+ Comment: 'no comment',
165
+ States: {},
166
+ };
167
+ const input = {
168
+ stateMachineArn: fakeStepFunctionArn,
169
+ definition: JSON.stringify(definitionObj),
170
+ };
171
+ mockedStepFunctionsClient.on(client_sfn_1.UpdateStateMachineCommand, input).resolves(expectedResp);
172
+ const actual = yield (0, awsCommands_1.updateStateMachineDefinition)(new client_sfn_1.SFNClient({}), describeStateMachineCommandOutput, definitionObj, mockedContext, false);
173
+ expect(actual).toEqual(expectedResp);
174
+ }));
175
+ test('describeStateMachine test', () => __awaiter(void 0, void 0, void 0, function* () {
176
+ const input = { stateMachineArn: fakeStepFunctionArn };
177
+ mockedStepFunctionsClient.on(client_sfn_1.DescribeStateMachineCommand, input).resolves(expectedResp);
178
+ const actual = yield (0, awsCommands_1.describeStateMachine)(new client_sfn_1.SFNClient({}), fakeStepFunctionArn);
179
+ expect(actual).toEqual(expectedResp);
180
+ }));
181
+ test('untagResource test', () => __awaiter(void 0, void 0, void 0, function* () {
182
+ const fakeTagKeys = ['tagKey1', 'tagKey2'];
183
+ const input = {
184
+ resourceArn: fakeStepFunctionArn,
185
+ tagKeys: fakeTagKeys,
186
+ };
187
+ mockedStepFunctionsClient.on(client_sfn_1.UntagResourceCommand, input).resolves(expectedResp);
188
+ const actual = yield (0, awsCommands_1.untagResource)(new client_sfn_1.SFNClient({}), fakeTagKeys, fakeStepFunctionArn, mockedContext, false);
189
+ expect(actual).toEqual(expectedResp);
190
+ }));
191
+ });
192
+ //# sourceMappingURL=awsCommands.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"awsCommands.test.js","sourceRoot":"","sources":["../../../../src/commands/stepfunctions/__tests__/awsCommands.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4EAKwC;AACxC,oDAA2F;AAC3F,oDAS4B;AAC5B,6DAA8C;AAE9C,kEAAqE;AAErE,gDAYuB;AACvB,wCAA+E;AAE/E,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,YAAY,GAAG,EAAC,OAAO,EAAE,WAAW,EAAQ,CAAA;IAClD,MAAM,gBAAgB,GAAG,kBAAkB,CAAA;IAC3C,MAAM,cAAc,GAAG,gBAAgB,CAAA;IACvC,MAAM,gBAAgB,GAAG,kBAAkB,CAAA;IAC3C,MAAM,eAAe,GAAG,iBAAiB,CAAA;IACzC,MAAM,mBAAmB,GAAG,2EAA2E,CAAA;IACvG,MAAM,oBAAoB,GAAG,0BAA0B,CAAA;IACvD,MAAM,aAAa,GAAG,cAAc,CAAA;IACpC,MAAM,WAAW,GAAG,gBAAgB,aAAa,gCAAgC,CAAA;IAEjF,MAAM,0BAA0B,GAAG,IAAA,gCAAU,EAAC,6CAAoB,CAAC,CAAA;IACnE,MAAM,eAAe,GAAG,IAAA,gCAAU,EAAC,sBAAS,CAAC,CAAA;IAC7C,MAAM,yBAAyB,GAAG,IAAA,gCAAU,EAAC,sBAAS,CAAC,CAAA;IACvD,IAAI,iCAAoE,CAAA;IACxE,IAAI,aAAkB,CAAA;IAEtB,UAAU,CAAC,GAAG,EAAE;QACd,yBAAyB,CAAC,KAAK,EAAE,CAAA;QACjC,0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,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACtC,CAAC,CAAA,CAAC,CAAA;IAEF,IAAI,CAAC,oBAAoB,EAAE,GAAS,EAAE;QACpC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG;YACZ,WAAW,EAAE,mBAAmB;YAChC,OAAO,EAAE,WAAW;SACrB,CAAA;QAED,yBAAyB,CAAC,EAAE,CAAC,iCAAoB,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;QAEhF,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAa,EAAC,IAAI,sBAAS,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,aAAa,EAAE,KAAK,CAAC,CAAA;QAE7G,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IACtC,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { SubscriptionFilter } from '@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0';
2
+ import { DescribeStateMachineCommandOutput } from '@aws-sdk/client-sfn';
3
+ import { Tag } from '@aws-sdk/client-sfn/dist-types/ts3.4/models/models_0';
4
+ export declare const describeStateMachineFixture: (props?: Partial<DescribeStateMachineCommandOutput>) => DescribeStateMachineCommandOutput;
5
+ export declare const stepFunctionTagListFixture: (props?: Tag[]) => Tag[];
6
+ export declare const subscriptionFilterFixture: (props?: Partial<SubscriptionFilter>) => SubscriptionFilter;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscriptionFilterFixture = exports.stepFunctionTagListFixture = exports.describeStateMachineFixture = void 0;
4
+ const client_sfn_1 = require("@aws-sdk/client-sfn");
5
+ const describeStateMachineFixture = (props = {}) => {
6
+ const defaults = {
7
+ $metadata: {},
8
+ stateMachineArn: 'arn:aws:states:us-east-1:000000000000:stateMachine:ExampleStepFunction',
9
+ name: 'ExampleStepFunction',
10
+ definition: '',
11
+ loggingConfiguration: {
12
+ level: client_sfn_1.LogLevel.ALL,
13
+ includeExecutionData: true,
14
+ destinations: [
15
+ {
16
+ cloudWatchLogsLogGroup: {
17
+ logGroupArn: 'arn:aws:logs:us-east-1:000000000000:log-group:/aws/vendedlogs/states/ExampleStepFunction-Logs-test:*',
18
+ },
19
+ },
20
+ ],
21
+ },
22
+ roleArn: `arn:aws:iam::000000000000:role/ExampleStepFunctionRole`,
23
+ type: 'STANDARD',
24
+ creationDate: new Date('2023-03-08T00:00:00Z'),
25
+ };
26
+ return Object.assign(Object.assign({}, defaults), props);
27
+ };
28
+ exports.describeStateMachineFixture = describeStateMachineFixture;
29
+ const stepFunctionTagListFixture = (props = []) => {
30
+ const defaults = [{ key: 'env', value: 'test' }];
31
+ defaults.push(...props);
32
+ return defaults;
33
+ };
34
+ exports.stepFunctionTagListFixture = stepFunctionTagListFixture;
35
+ const subscriptionFilterFixture = (props = {}) => {
36
+ const defaults = {
37
+ destinationArn: 'arn:aws:lambda:us-east-1:000000000000:function:DatadogForwarder',
38
+ filterName: 'ExampleStepFunction-DdCiLogGroupSubscription',
39
+ filterPattern: '',
40
+ logGroupName: '/aws/vendedlogs/states/ExampleStepFunction-Logs-test',
41
+ };
42
+ return Object.assign(Object.assign({}, defaults), props);
43
+ };
44
+ exports.subscriptionFilterFixture = subscriptionFilterFixture;
45
+ //# sourceMappingURL=aws-resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aws-resources.js","sourceRoot":"","sources":["../../../../../src/commands/stepfunctions/__tests__/fixtures/aws-resources.ts"],"names":[],"mappings":";;;AACA,oDAA+E;AAGxE,MAAM,2BAA2B,GAAG,CACzC,QAAoD,EAAE,EACnB,EAAE;IACrC,MAAM,QAAQ,GAAsC;QAClD,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,wEAAwE;QACzF,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE,EAAE;QACd,oBAAoB,EAAE;YACpB,KAAK,EAAE,qBAAQ,CAAC,GAAG;YACnB,oBAAoB,EAAE,IAAI;YAC1B,YAAY,EAAE;gBACZ;oBACE,sBAAsB,EAAE;wBACtB,WAAW,EACT,sGAAsG;qBACzG;iBACF;aACF;SACF;QACD,OAAO,EAAE,wDAAwD;QACjE,IAAI,EAAE,UAAU;QAChB,YAAY,EAAE,IAAI,IAAI,CAAC,sBAAsB,CAAC;KAC/C,CAAA;IAED,uCAAW,QAAQ,GAAK,KAAK,EAAC;AAChC,CAAC,CAAA;AA1BY,QAAA,2BAA2B,+BA0BvC;AAEM,MAAM,0BAA0B,GAAG,CAAC,QAAe,EAAE,EAAS,EAAE;IACrE,MAAM,QAAQ,GAAU,CAAC,EAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAC,CAAC,CAAA;IACrD,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAA;IAEvB,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AALY,QAAA,0BAA0B,8BAKtC;AAEM,MAAM,yBAAyB,GAAG,CAAC,QAAqC,EAAE,EAAsB,EAAE;IACvG,MAAM,QAAQ,GAAuB;QACnC,cAAc,EAAE,iEAAiE;QACjF,UAAU,EAAE,8CAA8C;QAC1D,aAAa,EAAE,EAAE;QACjB,YAAY,EAAE,sDAAsD;KACrE,CAAA;IAED,uCAAW,QAAQ,GAAK,KAAK,EAAC;AAChC,CAAC,CAAA;AATY,QAAA,yBAAyB,6BASrC"}
@@ -0,0 +1,5 @@
1
+ import type { CommandContext } from '../../../../helpers/interfaces';
2
+ export interface ContextFixture extends CommandContext {
3
+ toString: () => string;
4
+ }
5
+ export declare const contextFixture: () => ContextFixture;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.contextFixture = void 0;
4
+ const stream_1 = require("stream");
5
+ const contextFixture = () => {
6
+ let data = '';
7
+ return {
8
+ stdout: new stream_1.Writable({
9
+ write: (chunk, encoding, next) => {
10
+ data += chunk.toString();
11
+ next();
12
+ },
13
+ }),
14
+ stderr: jest.fn(),
15
+ toString: () => data,
16
+ };
17
+ };
18
+ exports.contextFixture = contextFixture;
19
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../../src/commands/stepfunctions/__tests__/fixtures/cli.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAQxB,MAAM,cAAc,GAAG,GAAmB,EAAE;IACjD,IAAI,IAAI,GAAG,EAAE,CAAA;IAEb,OAAO;QACL,MAAM,EAAE,IAAI,iBAAQ,CAAC;YACnB,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;gBAC/B,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAA;gBACxB,IAAI,EAAE,CAAA;YACR,CAAC;SACF,CAAC;QACF,MAAM,EAAE,IAAI,CAAC,EAAE,EAAS;QACxB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;KACrB,CAAA;AACH,CAAC,CAAA;AAbY,QAAA,cAAc,kBAa1B"}
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const client_sfn_1 = require("@aws-sdk/client-sfn");
4
+ const helpers_1 = require("../helpers");
5
+ const aws_resources_1 = require("./fixtures/aws-resources");
6
+ describe('stepfunctions command helpers tests', () => {
7
+ describe('shouldUpdateStepForTracesMerging test', () => {
8
+ test('already has JsonMerge added to payload field', () => {
9
+ const step = {
10
+ Type: 'Task',
11
+ Resource: 'arn:aws:states:::lambda:invoke',
12
+ Parameters: {
13
+ FunctionName: 'arn:aws:lambda:sa-east-1:425362991234:function:unit-test-lambda-function',
14
+ 'Payload.$': 'States.JsonMerge($$, $, false)',
15
+ },
16
+ End: true,
17
+ };
18
+ expect((0, helpers_1.shouldUpdateStepForTracesMerging)(step)).toBeFalsy();
19
+ });
20
+ test('no payload field', () => {
21
+ const step = {
22
+ Type: 'Task',
23
+ Resource: 'arn:aws:states:::lambda:invoke',
24
+ Parameters: {
25
+ FunctionName: 'arn:aws:lambda:sa-east-1:425362991234:function:unit-test-lambda-function',
26
+ },
27
+ End: true,
28
+ };
29
+ expect((0, helpers_1.shouldUpdateStepForTracesMerging)(step)).toBeTruthy();
30
+ });
31
+ test('default payload field of $', () => {
32
+ const step = {
33
+ Type: 'Task',
34
+ Resource: 'arn:aws:states:::lambda:invoke',
35
+ Parameters: {
36
+ FunctionName: 'arn:aws:lambda:sa-east-1:425362991234:function:unit-test-lambda-function',
37
+ 'Payload.$': '$',
38
+ },
39
+ End: true,
40
+ };
41
+ expect((0, helpers_1.shouldUpdateStepForTracesMerging)(step)).toBeTruthy();
42
+ });
43
+ test('none-lambda step should not be updated', () => {
44
+ const step = {
45
+ Type: 'Task',
46
+ Resource: 'arn:aws:states:::dynamodb:updateItem',
47
+ Parameters: {
48
+ TableName: 'step-functions-tracing-self-monitoring-table-staging',
49
+ },
50
+ End: true,
51
+ };
52
+ expect((0, helpers_1.shouldUpdateStepForTracesMerging)(step)).toBeFalsy();
53
+ });
54
+ test('legacy lambda api should not be updated', () => {
55
+ const step = {
56
+ Type: 'Task',
57
+ Resource: 'arn:aws:lambda:sa-east-1:601427271234:function:hello-function',
58
+ End: true,
59
+ };
60
+ expect((0, helpers_1.shouldUpdateStepForTracesMerging)(step)).toBeFalsy();
61
+ });
62
+ });
63
+ describe('buildArn', () => {
64
+ test('builds log group arn', () => {
65
+ const partition = 'aws';
66
+ const service = 'logs';
67
+ const region = 'us-east-1';
68
+ const accountId = '000000000000';
69
+ const resourceType = 'log-group';
70
+ const resourceId = '/aws/vendedlogs/states/ExampleStepFunction-Logs-test:*';
71
+ const logGroupArn = (0, helpers_1.buildArn)(partition, service, region, accountId, resourceType, resourceId);
72
+ expect(logGroupArn).toBe('arn:aws:logs:us-east-1:000000000000:log-group:/aws/vendedlogs/states/ExampleStepFunction-Logs-test:*');
73
+ });
74
+ });
75
+ describe('buildLogGroupName', () => {
76
+ test('builds log group name from step function name with env', () => {
77
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
78
+ const env = 'test';
79
+ const logGroupName = (0, helpers_1.buildLogGroupName)(stepFunction.name, env);
80
+ expect(logGroupName).toBe('/aws/vendedlogs/states/ExampleStepFunction-Logs-test');
81
+ });
82
+ test('builds log group name from step function name without env', () => {
83
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
84
+ let env;
85
+ const logGroupName = (0, helpers_1.buildLogGroupName)(stepFunction.name, env);
86
+ expect(logGroupName).toBe('/aws/vendedlogs/states/ExampleStepFunction-Logs');
87
+ });
88
+ });
89
+ describe('buildSubscriptionFilterName', () => {
90
+ test('builds subscription filter name from step function name', () => {
91
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
92
+ const subscriptionFilterName = (0, helpers_1.buildSubscriptionFilterName)(stepFunction.name);
93
+ expect(subscriptionFilterName).toBe('ExampleStepFunction-DdCiLogGroupSubscription');
94
+ });
95
+ });
96
+ describe('isValidArn', () => {
97
+ test('returns true for valid step function arn', () => {
98
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
99
+ expect((0, helpers_1.isValidArn)(stepFunction.stateMachineArn)).toBe(true);
100
+ });
101
+ test('returns true for valid lambda function arn', () => {
102
+ const lambdaFunctionArn = 'arn:aws:lambda:us-east-1:000000000000:function:DatadogForwarder';
103
+ expect((0, helpers_1.isValidArn)(lambdaFunctionArn)).toBe(true);
104
+ });
105
+ test('returns false for invalid arn', () => {
106
+ const arn = '';
107
+ expect((0, helpers_1.isValidArn)(arn)).toBe(false);
108
+ });
109
+ });
110
+ describe('getStepFunctionLogGroupArn', () => {
111
+ test('returns step function log group arn when it is set', () => {
112
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
113
+ const logGroupArn = (0, helpers_1.getStepFunctionLogGroupArn)(stepFunction);
114
+ expect(logGroupArn).toBe('arn:aws:logs:us-east-1:000000000000:log-group:/aws/vendedlogs/states/ExampleStepFunction-Logs-test:*');
115
+ });
116
+ test('returns undefined when step function logging is off', () => {
117
+ const loggingConfiguration = {
118
+ level: client_sfn_1.LogLevel.OFF,
119
+ includeExecutionData: false,
120
+ };
121
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)({ loggingConfiguration });
122
+ const logGroupArn = (0, helpers_1.getStepFunctionLogGroupArn)(stepFunction);
123
+ expect(logGroupArn).toBe(undefined);
124
+ });
125
+ });
126
+ describe('parseArn', () => {
127
+ test('parses step function arn', () => {
128
+ const stepFunction = (0, aws_resources_1.describeStateMachineFixture)();
129
+ const arnObject = (0, helpers_1.parseArn)(stepFunction.stateMachineArn);
130
+ expect(arnObject.partition).toBe('aws');
131
+ expect(arnObject.region).toBe('us-east-1');
132
+ expect(arnObject.accountId).toBe('000000000000');
133
+ expect(arnObject.resourceName).toBe('ExampleStepFunction');
134
+ });
135
+ });
136
+ describe('shouldUpdateStepForStepFunctionContextInjection', () => {
137
+ test('is true for an empty object', () => {
138
+ const step = {
139
+ Type: 'Task',
140
+ Resource: 'arn:aws:states:::states:startExecution.sync:2',
141
+ Parameters: {
142
+ StateMachineArn: 'arn:aws:states:us-east-1:425362996713:stateMachine:agocs_inner_state_machine',
143
+ Input: {},
144
+ },
145
+ End: true,
146
+ };
147
+ expect((0, helpers_1.shouldUpdateStepForStepFunctionContextInjection)(step)).toBeTruthy();
148
+ });
149
+ test('is true for undefined', () => {
150
+ const step = {
151
+ Type: 'Task',
152
+ Resource: 'arn:aws:states:::states:startExecution.sync:2',
153
+ Parameters: {
154
+ StateMachineArn: 'arn:aws:states:us-east-1:425362996713:stateMachine:agocs_inner_state_machine',
155
+ },
156
+ End: true,
157
+ };
158
+ expect((0, helpers_1.shouldUpdateStepForStepFunctionContextInjection)(step)).toBeTruthy();
159
+ });
160
+ test('is false when Input is an object that contains a CONTEXT key', () => {
161
+ const step = {
162
+ Type: 'Task',
163
+ Resource: 'arn:aws:states:::states:startExecution.sync:2',
164
+ Parameters: {
165
+ StateMachineArn: 'arn:aws:states:us-east-1:425362996713:stateMachine:agocs_inner_state_machine',
166
+ Input: { 'CONTEXT.$': 'blah' },
167
+ },
168
+ End: true,
169
+ };
170
+ expect((0, helpers_1.shouldUpdateStepForStepFunctionContextInjection)(step)).toBeFalsy();
171
+ });
172
+ });
173
+ describe('inject context for StepFunctions', () => {
174
+ test('injects context into a step function invocation', () => {
175
+ var _a;
176
+ const step = {
177
+ Type: 'Task',
178
+ Resource: 'arn:aws:states:::states:startExecution.sync:2',
179
+ Parameters: {
180
+ StateMachineArn: 'arn:aws:states:us-east-1:425362996713:stateMachine:agocs_inner_state_machine',
181
+ Input: {},
182
+ },
183
+ End: true,
184
+ };
185
+ const changed = (0, helpers_1.injectContextForStepFunctions)(step);
186
+ expect(changed).toBeTruthy();
187
+ expect((_a = step.Parameters) === null || _a === void 0 ? void 0 : _a.Input).toEqual({ 'CONTEXT.$': 'States.JsonMerge($$, $, false)' });
188
+ });
189
+ });
190
+ test('buildLogAccessPolicyName test', () => {
191
+ const fakeStateMachineName = 'fakeStateMachineName';
192
+ const describeStateMachineCommandOutput = {
193
+ $metadata: {},
194
+ creationDate: undefined,
195
+ definition: undefined,
196
+ roleArn: undefined,
197
+ type: undefined,
198
+ stateMachineArn: 'fakeStepFunctionArn',
199
+ name: fakeStateMachineName,
200
+ };
201
+ const actual = (0, helpers_1.buildLogAccessPolicyName)(describeStateMachineCommandOutput);
202
+ expect(actual).toEqual(`LogsDeliveryAccessPolicy-${fakeStateMachineName}`);
203
+ });
204
+ });
205
+ //# sourceMappingURL=helpers.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.test.js","sourceRoot":"","sources":["../../../../src/commands/stepfunctions/__tests__/helpers.test.ts"],"names":[],"mappings":";;AAAA,oDAA+E;AAE/E,wCAYmB;AAEnB,4DAAoE;AAEpE,QAAQ,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