@rockcarver/frodo-cli 0.11.1-0 → 0.11.1-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.
Files changed (90) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/package.json +12 -10
  3. package/src/app.js +3 -3
  4. package/.eslintrc +0 -29
  5. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
  6. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  7. package/.github/README.md +0 -213
  8. package/.github/workflows/pipeline.yml +0 -495
  9. package/.prettierrc +0 -6
  10. package/CODE_OF_CONDUCT.md +0 -128
  11. package/docs/BINARIES.md +0 -22
  12. package/docs/CONTRIBUTE.md +0 -96
  13. package/docs/PIPELINE.md +0 -169
  14. package/docs/images/macos_warn1.png +0 -0
  15. package/docs/images/macos_warn2.png +0 -0
  16. package/docs/images/macos_warn3.png +0 -0
  17. package/docs/images/npm_versioning_guidelines.png +0 -0
  18. package/docs/images/release_pipeline.png +0 -0
  19. package/gulpfile.js +0 -49
  20. package/jsconfig.json +0 -6
  21. package/resources/sampleEntitiesFile.json +0 -8
  22. package/resources/sampleEnvFile.env +0 -2
  23. package/src/cli/journey/journey-delete.e2e.test_.js +0 -380
  24. package/src/cli/journey/journey-list.e2e.test_.js +0 -142
  25. package/src/cli/theme/theme-delete.e2e.test_.js +0 -178
  26. package/src/cli/theme/theme-list.e2e.test_.js +0 -119
  27. package/test/client_cli/en/conn-add.test.js +0 -37
  28. package/test/client_cli/en/conn-delete.test.js +0 -37
  29. package/test/client_cli/en/conn-list.test.js +0 -37
  30. package/test/client_cli/en/conn.test.js +0 -65
  31. package/test/client_cli/en/email-template-import.test.js +0 -156
  32. package/test/client_cli/en/email-template.test.js +0 -79
  33. package/test/client_cli/en/email-templates-export.test.js +0 -208
  34. package/test/client_cli/en/email-templates-list.test.js +0 -139
  35. package/test/client_cli/en/idm-count.test.js +0 -131
  36. package/test/client_cli/en/idm-export.test.js +0 -149
  37. package/test/client_cli/en/idm-import.test_.js +0 -101
  38. package/test/client_cli/en/idm-list.test.js +0 -109
  39. package/test/client_cli/en/idm.test.js +0 -82
  40. package/test/client_cli/en/info.test.js +0 -136
  41. package/test/client_cli/en/journey-describe.test.js +0 -194
  42. package/test/client_cli/en/journey-export.test.js +0 -231
  43. package/test/client_cli/en/journey-import.test.js +0 -212
  44. package/test/client_cli/en/journey-list.test.js +0 -173
  45. package/test/client_cli/en/journey-prune.test.js +0 -159
  46. package/test/client_cli/en/journey.test.js +0 -111
  47. package/test/client_cli/en/logs-list.test.js +0 -81
  48. package/test/client_cli/en/logs-tail.test.js +0 -130
  49. package/test/client_cli/en/logs.test.js +0 -65
  50. package/test/client_cli/en/root.test.js +0 -93
  51. package/test/client_cli/en/script-export.test.js +0 -230
  52. package/test/client_cli/en/script-import.test.js +0 -176
  53. package/test/client_cli/en/script-list.test.js +0 -159
  54. package/test/client_cli/en/script.test.js +0 -79
  55. package/test/client_cli/utils/utils.js +0 -63
  56. package/test/e2e/journey/baseline/ForgottenUsername.journey.json +0 -216
  57. package/test/e2e/journey/baseline/Login.journey.json +0 -205
  58. package/test/e2e/journey/baseline/PasswordGrant.journey.json +0 -139
  59. package/test/e2e/journey/baseline/ProgressiveProfile.journey.json +0 -198
  60. package/test/e2e/journey/baseline/Registration.journey.json +0 -249
  61. package/test/e2e/journey/baseline/ResetPassword.journey.json +0 -268
  62. package/test/e2e/journey/baseline/UpdatePassword.journey.json +0 -323
  63. package/test/e2e/journey/baseline/allAlphaJourneys.journeys.json +0 -1520
  64. package/test/e2e/journey/delete/ForgottenUsername.journey.json +0 -216
  65. package/test/e2e/journey/delete/Login.journey.json +0 -205
  66. package/test/e2e/journey/delete/PasswordGrant.journey.json +0 -139
  67. package/test/e2e/journey/delete/ProgressiveProfile.journey.json +0 -198
  68. package/test/e2e/journey/delete/Registration.journey.json +0 -249
  69. package/test/e2e/journey/delete/ResetPassword.journey.json +0 -268
  70. package/test/e2e/journey/delete/UpdatePassword.journey.json +0 -323
  71. package/test/e2e/journey/delete/deleteMe.journey.json +0 -230
  72. package/test/e2e/journey/list/Disabled.journey.json +0 -43
  73. package/test/e2e/journey/list/ForgottenUsername.journey.json +0 -216
  74. package/test/e2e/journey/list/Login.journey.json +0 -205
  75. package/test/e2e/journey/list/PasswordGrant.journey.json +0 -139
  76. package/test/e2e/journey/list/ProgressiveProfile.journey.json +0 -198
  77. package/test/e2e/journey/list/Registration.journey.json +0 -249
  78. package/test/e2e/journey/list/ResetPassword.journey.json +0 -268
  79. package/test/e2e/journey/list/UpdatePassword.journey.json +0 -323
  80. package/test/e2e/theme/baseline/Contrast.theme.json +0 -95
  81. package/test/e2e/theme/baseline/Highlander.theme.json +0 -95
  82. package/test/e2e/theme/baseline/Robroy.theme.json +0 -95
  83. package/test/e2e/theme/baseline/Starter-Theme.theme.json +0 -94
  84. package/test/e2e/theme/baseline/Zardoz.theme.json +0 -95
  85. package/test/e2e/theme/import/Contrast.theme.json +0 -95
  86. package/test/e2e/theme/import/Highlander.theme.json +0 -95
  87. package/test/e2e/theme/import/Robroy.theme.json +0 -95
  88. package/test/e2e/theme/import/Starter-Theme.theme.json +0 -94
  89. package/test/e2e/theme/import/Zardoz.default.theme.json +0 -95
  90. package/test/fs_tmp/.gitkeep +0 -2
@@ -1,208 +0,0 @@
1
- import cp from 'child_process';
2
- import { promisify } from 'util';
3
- import {
4
- crudeMultilineTakeUntil,
5
- collapseWhitespace,
6
- node14Compatibility,
7
- } from '../utils/utils.js';
8
-
9
- node14Compatibility();
10
-
11
- const exec = promisify(cp.exec);
12
- const CMD = 'frodo email template export --help';
13
- const { stdout } = await exec(CMD);
14
-
15
- test("CLI help interface for 'email_templates export' Usage should be expected english", async () => {
16
- // Arrange
17
- const expected = `
18
- Usage: frodo email template export [options] <host> [realm] [user] [password]
19
- `.trim();
20
- // Act
21
- const testLine = stdout
22
- .split(/\n/)
23
- .find((line) => line.trim().startsWith('Usage:'))
24
- .trim();
25
- // Assert
26
- expect(testLine).toBe(expected);
27
- });
28
-
29
- test("CLI help interface 'email_templates export' description at line 2 should be expected english", async () => {
30
- // Arrange
31
- const expected = `
32
- Export email templates.
33
- `.trim();
34
- // Act
35
- const testLine = stdout
36
- .split(/\n/)
37
- .map((line) => line.trim())
38
- .at(2);
39
- // Assert
40
- expect(testLine).toBe(expected);
41
- });
42
-
43
- test("CLI help interface 'export argument host' description should be expected english multiline", async () => {
44
- // Arrange
45
- const expected = collapseWhitespace(`
46
- host Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring. realm Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise. (default: "alpha" for Identity Cloud tenants, "/" otherwise.)
47
- `);
48
- // Act
49
- const testLine = collapseWhitespace(
50
- crudeMultilineTakeUntil(
51
- stdout,
52
- ' host ',
53
- ' user '
54
- )
55
- );
56
-
57
- // Assert
58
- expect(testLine).toBe(expected);
59
- });
60
-
61
- test("CLI help interface 'export argument user' description should be expected english multiline", async () => {
62
- // Arrange
63
- const expected = collapseWhitespace(`
64
- user Username to login with. Must be an admin user with appropriate
65
- rights to manage authentication journeys/trees.
66
- `);
67
- // Act
68
- const testLine = collapseWhitespace(
69
- crudeMultilineTakeUntil(
70
- stdout,
71
- ' user ',
72
- ' password '
73
- )
74
- );
75
-
76
- // Assert
77
- expect(testLine).toBe(expected);
78
- });
79
-
80
- test("CLI help interface 'export argument password' description should be expected english", async () => {
81
- // Arrange
82
- const expectedDescription = `
83
- password Password.
84
- `.trim();
85
- // Act
86
- const testLine = stdout
87
- .split(/\n/)
88
- .find((line) => line.trim().startsWith('password'))
89
- .trim();
90
- // Assert
91
- expect(testLine).toBe(expectedDescription);
92
- });
93
-
94
- test("CLI help interface 'export option -m, --type <type>' description should be expected english multiline", async () => {
95
- // Arrange
96
- const expected = collapseWhitespace(`
97
- -m, --type <type> Override auto-detected deployment type. Valid values for
98
- type:
99
- classic: A classic Access Management-only deployment
100
- with custom layout and configuration.
101
- cloud: A ForgeRock Identity Cloud environment.
102
- forgeops: A ForgeOps CDK or CDM deployment.
103
- The detected or provided deployment type controls certain
104
- behavior like obtaining an Identity Management admin
105
- token or not and whether to export/import referenced
106
- email templates or how to walk through the tenant admin
107
- login flow of Identity Cloud and handle MFA (choices:
108
- "classic", "cloud", "forgeops")
109
- `);
110
- // Act
111
- const testLine = collapseWhitespace(
112
- crudeMultilineTakeUntil(
113
- stdout,
114
- ' -m, --type <type> ',
115
- ' -k, --insecure '
116
- )
117
- );
118
-
119
- // Assert
120
- expect(testLine).toBe(expected);
121
- });
122
-
123
- test("CLI help interface 'export option -k, --insecure' description should be expected english multiline", async () => {
124
- // Arrange
125
- const expected = collapseWhitespace(`
126
- -k, --insecure Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability. (default: Don't allow insecure connections)
127
- `);
128
- // Act
129
- const testLine = collapseWhitespace(
130
- crudeMultilineTakeUntil(
131
- stdout,
132
- ' -k, --insecure ',
133
- ' -i, --template-id <template-id> '
134
- )
135
- );
136
-
137
- // Assert
138
- expect(testLine).toBe(expected);
139
- });
140
-
141
- test("CLI help interface 'export option -t, --template <template>' description should be expected english multiline", async () => {
142
- // Arrange
143
- const expected = collapseWhitespace(`
144
- -i, --template-id <template-id> Email template id/name. If specified, -a and -A are ignored.
145
- `);
146
- // Act
147
- const testLine = collapseWhitespace(
148
- crudeMultilineTakeUntil(
149
- stdout,
150
- ' -i, --template-id <template-id> ',
151
- ' -f, --file [file] '
152
- )
153
- );
154
-
155
- // Assert
156
- expect(testLine).toBe(expected);
157
- });
158
-
159
- test("CLI help interface 'export option -f, --file <file>' description should be expected english", async () => {
160
- // Arrange
161
- const expected = collapseWhitespace(`
162
- -f, --file [file] Name of the export file. Ignored with -A. Defaults to <template-id>.template.email.json.
163
- `);
164
- // Act
165
- const testLine = collapseWhitespace(
166
- crudeMultilineTakeUntil(
167
- stdout,
168
- ' -f, --file [file] ',
169
- ' -a, --all '
170
- )
171
- );
172
- // Assert
173
- expect(testLine).toBe(expected);
174
- });
175
-
176
- test("CLI help interface 'export option -a, --all' description should be expected english", async () => {
177
- // Arrange
178
- const expected = collapseWhitespace(`
179
- -a, --all Export all email templates to a single file. Ignored with -i.
180
- `);
181
- // Act
182
- const testLine = collapseWhitespace(
183
- crudeMultilineTakeUntil(
184
- stdout,
185
- ' -a, --all ',
186
- ' -A, --all-separate '
187
- )
188
- );
189
- // Assert
190
- expect(testLine).toBe(expected);
191
- });
192
-
193
- test("CLI help interface 'export option -A, --allSeparate' description should be expected english", async () => {
194
- // Arrange
195
- const expected = collapseWhitespace(`
196
- -A, --all-separate Export all email templates as separate files <template-id>.template.email.json. Ignored with -i, and -a.
197
- `);
198
- // Act
199
- const testLine = collapseWhitespace(
200
- crudeMultilineTakeUntil(
201
- stdout,
202
- ' -A, --all-separate ',
203
- ' -h, --help '
204
- )
205
- );
206
- // Assert
207
- expect(testLine).toBe(expected);
208
- });
@@ -1,139 +0,0 @@
1
- import cp from 'child_process';
2
- import { promisify } from 'util';
3
- import {
4
- crudeMultilineTakeUntil,
5
- collapseWhitespace,
6
- node14Compatibility,
7
- } from '../utils/utils.js';
8
-
9
- node14Compatibility();
10
-
11
- const exec = promisify(cp.exec);
12
- const CMD = 'frodo email template list --help';
13
- const { stdout } = await exec(CMD);
14
-
15
- test("CLI help interface for 'email_templates list' Usage should be expected english", async () => {
16
- // Arrange
17
- const expected = `
18
- Usage: frodo email template list [options] <host> [realm] [user] [password]
19
- `.trim();
20
- // Act
21
- const testLine = stdout
22
- .split(/\n/)
23
- .find((line) => line.trim().startsWith('Usage:'))
24
- .trim();
25
- // Assert
26
- expect(testLine).toBe(expected);
27
- });
28
-
29
- test("CLI help interface 'email_templates list' description at line 2 should be expected english", async () => {
30
- // Arrange
31
- const expected = `
32
- List email templates.
33
- `.trim();
34
- // Act
35
- const testLine = stdout
36
- .split(/\n/)
37
- .map((line) => line.trim())
38
- .at(2);
39
- // Assert
40
- expect(testLine).toBe(expected);
41
- });
42
-
43
- test("CLI help interface 'list argument host' description should be expected english multiline", async () => {
44
- // Arrange
45
- const expected = collapseWhitespace(`
46
- host Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring. realm Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise. (default: "alpha" for Identity Cloud tenants, "/" otherwise.)
47
- `);
48
- // Act
49
- const testLine = collapseWhitespace(
50
- crudeMultilineTakeUntil(
51
- stdout,
52
- ' host ',
53
- ' user '
54
- )
55
- );
56
-
57
- // Assert
58
- expect(testLine).toBe(expected);
59
- });
60
-
61
- test("CLI help interface 'list argument user' description should be expected english multiline", async () => {
62
- // Arrange
63
- const expected = collapseWhitespace(`
64
- user Username to login with. Must be an admin user with appropriate
65
- rights to manage authentication journeys/trees.
66
- `);
67
- // Act
68
- const testLine = collapseWhitespace(
69
- crudeMultilineTakeUntil(
70
- stdout,
71
- ' user ',
72
- ' password '
73
- )
74
- );
75
-
76
- // Assert
77
- expect(testLine).toBe(expected);
78
- });
79
-
80
- test("CLI help interface 'list argument password' description should be expected english", async () => {
81
- // Arrange
82
- const expectedDescription = `
83
- password Password.
84
- `.trim();
85
- // Act
86
- const testLine = stdout
87
- .split(/\n/)
88
- .find((line) => line.trim().startsWith('password'))
89
- .trim();
90
- // Assert
91
- expect(testLine).toBe(expectedDescription);
92
- });
93
-
94
- test("CLI help interface 'list option -m, --type <type>' description should be expected english multiline", async () => {
95
- // Arrange
96
- const expected = collapseWhitespace(`
97
- -m, --type <type> Override auto-detected deployment type. Valid values for
98
- type:
99
- classic: A classic Access Management-only deployment
100
- with custom layout and configuration.
101
- cloud: A ForgeRock Identity Cloud environment.
102
- forgeops: A ForgeOps CDK or CDM deployment.
103
- The detected or provided deployment type controls certain
104
- behavior like obtaining an Identity Management admin
105
- token or not and whether to export/import referenced
106
- email templates or how to walk through the tenant admin
107
- login flow of Identity Cloud and handle MFA (choices:
108
- "classic", "cloud", "forgeops")
109
- `);
110
- // Act
111
- const testLine = collapseWhitespace(
112
- crudeMultilineTakeUntil(
113
- stdout,
114
- ' -m, --type <type> ',
115
- ' -k, --insecure '
116
- )
117
- );
118
-
119
- // Assert
120
- expect(testLine).toBe(expected);
121
- });
122
-
123
- test("CLI help interface 'list option -k, --insecure' description should be expected english multiline", async () => {
124
- // Arrange
125
- const expected = collapseWhitespace(`
126
- -k, --insecure Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability. (default: Don't allow insecure connections) -l, --long Long with all fields. (default: false)
127
- `);
128
- // Act
129
- const testLine = collapseWhitespace(
130
- crudeMultilineTakeUntil(
131
- stdout,
132
- ' -k, --insecure ',
133
- ' -h, --help '
134
- )
135
- );
136
-
137
- // Assert
138
- expect(testLine).toBe(expected);
139
- });
@@ -1,131 +0,0 @@
1
- import cp from 'child_process';
2
- import { promisify } from 'util';
3
- import {
4
- crudeMultilineTakeUntil,
5
- collapseWhitespace,
6
- node14Compatibility,
7
- } from '../utils/utils.js';
8
-
9
- node14Compatibility();
10
-
11
- const exec = promisify(cp.exec);
12
- const CMD = 'frodo idm count --help';
13
- const { stdout } = await exec(CMD);
14
-
15
- test("CLI help interface for 'idm count' Usage should be expected english", async () => {
16
- // Arrange
17
- const expected = `
18
- Usage: frodo idm count [options] <host> [realm] [user] [password]
19
- `.trim();
20
- // Act
21
- const testLine = stdout
22
- .split(/\n/)
23
- .find((line) => line.trim().startsWith('Usage:'))
24
- .trim();
25
- // Assert
26
- expect(testLine).toBe(expected);
27
- });
28
-
29
- test("CLI help interface 'idm export' description at line 2 should be expected english", async () => {
30
- // Arrange
31
- const expected = `
32
- Count managed objects.
33
- `.trim();
34
- // Act
35
- const testLine = stdout
36
- .split(/\n/)
37
- .map((line) => line.trim())
38
- .at(2);
39
- // Assert
40
- expect(testLine).toBe(expected);
41
- });
42
-
43
- test("CLI help interface 'count argument host' description should be expected english multiline", async () => {
44
- // Arrange
45
- const expected = collapseWhitespace(`
46
- host Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just
47
- specify a unique substring.
48
- `);
49
- // Act
50
- const testLine = collapseWhitespace(
51
- crudeMultilineTakeUntil(
52
- stdout,
53
- ' host ',
54
- ' realm '
55
- )
56
- );
57
-
58
- // Assert
59
- expect(testLine).toBe(expected);
60
- });
61
-
62
- test("CLI help interface 'count argument user' description should be expected english multiline", async () => {
63
- // Arrange
64
- const expected = collapseWhitespace(`
65
- user Username to login with. Must be an admin user with appropriate
66
- rights to manage authentication journeys/trees.
67
- `);
68
- // Act
69
- const testLine = collapseWhitespace(
70
- crudeMultilineTakeUntil(
71
- stdout,
72
- ' user ',
73
- ' password '
74
- )
75
- );
76
-
77
- // Assert
78
- expect(testLine).toBe(expected);
79
- });
80
-
81
- test("CLI help interface 'count argument password' description should be expected english", async () => {
82
- // Arrange
83
- const expectedDescription = `
84
- password Password.
85
- `.trim();
86
- // Act
87
- const testLine = stdout
88
- .split(/\n/)
89
- .find((line) => line.trim().startsWith('password'))
90
- .trim();
91
- // Assert
92
- expect(testLine).toBe(expectedDescription);
93
- });
94
-
95
- test("CLI help interface 'count option -N, --name <name>' description should be expected english multiline", async () => {
96
- // Arrange
97
- const expected = collapseWhitespace(`
98
- -m, --managed-object <type> Type of managed object to count. E.g. "alpha_user", "alpha_role", "user", "role".
99
- `);
100
- // Act
101
- const testLine = collapseWhitespace(
102
- crudeMultilineTakeUntil(
103
- stdout,
104
- ' -m, --managed-object <type> ',
105
- ' -h, --help '
106
- )
107
- );
108
-
109
- // Assert
110
- expect(testLine).toBe(expected);
111
- });
112
-
113
- test("CLI help interface 'export option -k, --insecure' description should be expected english multiline", async () => {
114
- // Arrange
115
- const expected = collapseWhitespace(`
116
- -k, --insecure Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https
117
- (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability. (default:
118
- Don't allow insecure connections)
119
- `);
120
- // Act
121
- const testLine = collapseWhitespace(
122
- crudeMultilineTakeUntil(
123
- stdout,
124
- ' -k, --insecure ',
125
- ' -m, --managed-object <type> '
126
- )
127
- );
128
-
129
- // Assert
130
- expect(testLine).toBe(expected);
131
- });
@@ -1,149 +0,0 @@
1
- import cp from 'child_process';
2
- import { promisify } from 'util';
3
- import {
4
- crudeMultilineTakeUntil,
5
- collapseWhitespace,
6
- node14Compatibility,
7
- } from '../utils/utils.js';
8
-
9
- node14Compatibility();
10
-
11
- const exec = promisify(cp.exec);
12
- const CMD = 'frodo idm export --help';
13
- const { stdout } = await exec(CMD);
14
-
15
- test("CLI help interface for 'idm export' Usage should be expected english", async () => {
16
- // Arrange
17
- const expected = `
18
- Usage: frodo idm export [options] <host> [realm] [user] [password]
19
- `.trim();
20
- // Act
21
- const testLine = stdout
22
- .split(/\n/)
23
- .find((line) => line.trim().startsWith('Usage:'))
24
- .trim();
25
- // Assert
26
- expect(testLine).toBe(expected);
27
- });
28
-
29
- test("CLI help interface 'idm export' description at line 2 should be expected english", async () => {
30
- // Arrange
31
- const expected = `
32
- Export IDM configuration objects.
33
- `.trim();
34
- // Act
35
- const testLine = stdout
36
- .split(/\n/)
37
- .map((line) => line.trim())
38
- .at(2);
39
- // Assert
40
- expect(testLine).toBe(expected);
41
- });
42
-
43
- test("CLI help interface 'count argument host' description should be expected english multiline", async () => {
44
- // Arrange
45
- const expected = collapseWhitespace(`
46
- host Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile,
47
- just specify a unique substring.
48
- `);
49
- // Act
50
- const testLine = collapseWhitespace(
51
- crudeMultilineTakeUntil(
52
- stdout,
53
- ' host ',
54
- ' realm '
55
- )
56
- );
57
-
58
- // Assert
59
- expect(testLine).toBe(expected);
60
- });
61
-
62
- test("CLI help interface 'count argument user' description should be expected english multiline", async () => {
63
- // Arrange
64
- const expected = collapseWhitespace(`
65
- user Username to login with. Must be an admin user with appropriate rights to manage authentication
66
- journeys/trees.
67
- `);
68
- // Act
69
- const testLine = collapseWhitespace(
70
- crudeMultilineTakeUntil(
71
- stdout,
72
- ' user ',
73
- ' password '
74
- )
75
- );
76
-
77
- // Assert
78
- expect(testLine).toBe(expected);
79
- });
80
-
81
- test("CLI help interface 'export argument password' description should be expected english", async () => {
82
- // Arrange
83
- const expectedDescription = `
84
- password Password.
85
- `.trim();
86
- // Act
87
- const testLine = stdout
88
- .split(/\n/)
89
- .find((line) => line.trim().startsWith('password'))
90
- .trim();
91
- // Assert
92
- expect(testLine).toBe(expectedDescription);
93
- });
94
-
95
- test("CLI help interface 'export option -N, --name <name>' description should be expected english multiline", async () => {
96
- // Arrange
97
- const expected = collapseWhitespace(`
98
- -N, --name <name> Config entity name. E.g. "managed", "sync", "provisioner-<connector-name>", etc.
99
- `);
100
- // Act
101
- const testLine = collapseWhitespace(
102
- crudeMultilineTakeUntil(
103
- stdout,
104
- ' -N, --name <name> ',
105
- ' -f, --file [file] '
106
- )
107
- );
108
-
109
- // Assert
110
- expect(testLine).toBe(expected);
111
- });
112
-
113
- test("CLI help interface 'count option -f, --file <file>' description should be expected english", async () => {
114
- // Arrange
115
- const expected = collapseWhitespace(`
116
- -f, --file [file] Export file. Ignored with -A.
117
- `);
118
- // Act
119
- const testLine = collapseWhitespace(
120
- crudeMultilineTakeUntil(
121
- stdout,
122
- ' -f, --file [file] ',
123
- ' -E, --entities-file [entities-file] '
124
- )
125
- );
126
-
127
- // Assert
128
- expect(testLine).toBe(expected);
129
- });
130
-
131
- test("CLI help interface 'export option -k, --insecure' description should be expected english multiline", async () => {
132
- // Arrange
133
- const expected = collapseWhitespace(`
134
- -k, --insecure Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for
135
- https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.
136
- (default: Don't allow insecure connections)
137
- `);
138
- // Act
139
- const testLine = collapseWhitespace(
140
- crudeMultilineTakeUntil(
141
- stdout,
142
- ' -k, --insecure ',
143
- ' -N, --name <name> '
144
- )
145
- );
146
-
147
- // Assert
148
- expect(testLine).toBe(expected);
149
- });