neonctl 1.32.1 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth.js +7 -3
- package/commands/auth.js +3 -2
- package/commands/auth.test.js +5 -7
- package/commands/bootstrap/authjs-secret.js +6 -0
- package/commands/bootstrap/index.js +459 -196
- package/commands/bootstrap/index.test.js +5 -16
- package/commands/bootstrap/is-folder-empty.js +1 -1
- package/commands/branches.js +27 -20
- package/commands/branches.test.js +106 -195
- package/commands/connection_string.test.js +48 -105
- package/commands/databases.js +4 -4
- package/commands/databases.test.js +10 -22
- package/commands/help.test.js +4 -6
- package/commands/ip_allow.test.js +39 -63
- package/commands/operations.js +1 -1
- package/commands/operations.test.js +3 -7
- package/commands/orgs.test.js +3 -7
- package/commands/projects.test.js +80 -124
- package/commands/roles.js +3 -3
- package/commands/roles.test.js +16 -21
- package/commands/set_context.js +1 -1
- package/commands/set_context.test.js +65 -62
- package/config.js +1 -1
- package/context.js +2 -2
- package/help.js +1 -1
- package/index.js +7 -3
- package/package.json +9 -7
- package/parameters.gen.js +4 -4
- package/test_utils/fixtures.js +84 -0
- package/writer.js +1 -1
- package/test_utils/mock_server.js +0 -16
- package/test_utils/test_cli_command.js +0 -80
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { describe, expect } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('connection_string', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: [
|
|
4
|
+
test('connection_string', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand([
|
|
7
6
|
'connection-string',
|
|
8
7
|
'test_branch',
|
|
9
8
|
'--project-id',
|
|
@@ -12,14 +11,10 @@ describe('connection_string', () => {
|
|
|
12
11
|
'test_db',
|
|
13
12
|
'--role-name',
|
|
14
13
|
'test_role',
|
|
15
|
-
]
|
|
16
|
-
expected: {
|
|
17
|
-
snapshot: true,
|
|
18
|
-
},
|
|
14
|
+
]);
|
|
19
15
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
args: [
|
|
16
|
+
test('connection_string branch id', async ({ testCliCommand }) => {
|
|
17
|
+
await testCliCommand([
|
|
23
18
|
'connection-string',
|
|
24
19
|
'br-sunny-branch-123456',
|
|
25
20
|
'--project-id',
|
|
@@ -28,14 +23,10 @@ describe('connection_string', () => {
|
|
|
28
23
|
'test_db',
|
|
29
24
|
'--role-name',
|
|
30
25
|
'test_role',
|
|
31
|
-
]
|
|
32
|
-
expected: {
|
|
33
|
-
snapshot: true,
|
|
34
|
-
},
|
|
26
|
+
]);
|
|
35
27
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
args: [
|
|
28
|
+
test('connection_string branch id 8 digits', async ({ testCliCommand }) => {
|
|
29
|
+
await testCliCommand([
|
|
39
30
|
'connection-string',
|
|
40
31
|
'br-cloudy-branch-12345678',
|
|
41
32
|
'--project-id',
|
|
@@ -44,14 +35,10 @@ describe('connection_string', () => {
|
|
|
44
35
|
'test_db',
|
|
45
36
|
'--role-name',
|
|
46
37
|
'test_role',
|
|
47
|
-
]
|
|
48
|
-
expected: {
|
|
49
|
-
snapshot: true,
|
|
50
|
-
},
|
|
38
|
+
]);
|
|
51
39
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
args: [
|
|
40
|
+
test('connection_string pooled', async ({ testCliCommand }) => {
|
|
41
|
+
await testCliCommand([
|
|
55
42
|
'connection-string',
|
|
56
43
|
'test_branch',
|
|
57
44
|
'--project-id',
|
|
@@ -61,14 +48,10 @@ describe('connection_string', () => {
|
|
|
61
48
|
'--role-name',
|
|
62
49
|
'test_role',
|
|
63
50
|
'--pooled',
|
|
64
|
-
]
|
|
65
|
-
expected: {
|
|
66
|
-
snapshot: true,
|
|
67
|
-
},
|
|
51
|
+
]);
|
|
68
52
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
args: [
|
|
53
|
+
test('connection_string prisma', async ({ testCliCommand }) => {
|
|
54
|
+
await testCliCommand([
|
|
72
55
|
'connection-string',
|
|
73
56
|
'test_branch',
|
|
74
57
|
'--project-id',
|
|
@@ -78,14 +61,10 @@ describe('connection_string', () => {
|
|
|
78
61
|
'--role-name',
|
|
79
62
|
'test_role',
|
|
80
63
|
'--prisma',
|
|
81
|
-
]
|
|
82
|
-
expected: {
|
|
83
|
-
snapshot: true,
|
|
84
|
-
},
|
|
64
|
+
]);
|
|
85
65
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
args: [
|
|
66
|
+
test('connection_string prisma pooled', async ({ testCliCommand }) => {
|
|
67
|
+
await testCliCommand([
|
|
89
68
|
'connection-string',
|
|
90
69
|
'test_branch',
|
|
91
70
|
'--project-id',
|
|
@@ -96,14 +75,10 @@ describe('connection_string', () => {
|
|
|
96
75
|
'test_role',
|
|
97
76
|
'--prisma',
|
|
98
77
|
'--pooled',
|
|
99
|
-
]
|
|
100
|
-
expected: {
|
|
101
|
-
snapshot: true,
|
|
102
|
-
},
|
|
78
|
+
]);
|
|
103
79
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
args: [
|
|
80
|
+
test('connection_string prisma pooled extended', async ({ testCliCommand, }) => {
|
|
81
|
+
await testCliCommand([
|
|
107
82
|
'connection-string',
|
|
108
83
|
'test_branch',
|
|
109
84
|
'--project-id',
|
|
@@ -115,22 +90,15 @@ describe('connection_string', () => {
|
|
|
115
90
|
'--prisma',
|
|
116
91
|
'--pooled',
|
|
117
92
|
'--extended',
|
|
118
|
-
]
|
|
119
|
-
expected: {
|
|
120
|
-
snapshot: true,
|
|
121
|
-
},
|
|
93
|
+
]);
|
|
122
94
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
expected: {
|
|
128
|
-
snapshot: true,
|
|
129
|
-
},
|
|
95
|
+
test('connection_string without any args should pass', async ({ testCliCommand, }) => {
|
|
96
|
+
await testCliCommand(['connection-string'], {
|
|
97
|
+
mockDir: 'single_project',
|
|
98
|
+
});
|
|
130
99
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
args: [
|
|
100
|
+
test('connection_string with psql', async ({ testCliCommand }) => {
|
|
101
|
+
await testCliCommand([
|
|
134
102
|
'connection-string',
|
|
135
103
|
'test_branch',
|
|
136
104
|
'--project-id',
|
|
@@ -140,14 +108,10 @@ describe('connection_string', () => {
|
|
|
140
108
|
'--role-name',
|
|
141
109
|
'test_role',
|
|
142
110
|
'--psql',
|
|
143
|
-
]
|
|
144
|
-
expected: {
|
|
145
|
-
snapshot: true,
|
|
146
|
-
},
|
|
111
|
+
]);
|
|
147
112
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
args: [
|
|
113
|
+
test('connection_string with psql and psql args', async ({ testCliCommand, }) => {
|
|
114
|
+
await testCliCommand([
|
|
151
115
|
'connection-string',
|
|
152
116
|
'test_branch',
|
|
153
117
|
'--project-id',
|
|
@@ -160,14 +124,10 @@ describe('connection_string', () => {
|
|
|
160
124
|
'--',
|
|
161
125
|
'-c',
|
|
162
126
|
'SELECT 1',
|
|
163
|
-
]
|
|
164
|
-
expected: {
|
|
165
|
-
snapshot: true,
|
|
166
|
-
},
|
|
127
|
+
]);
|
|
167
128
|
});
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
args: [
|
|
129
|
+
test('connection_string without ssl', async ({ testCliCommand }) => {
|
|
130
|
+
await testCliCommand([
|
|
171
131
|
'connection-string',
|
|
172
132
|
'test_branch',
|
|
173
133
|
'--project-id',
|
|
@@ -178,14 +138,10 @@ describe('connection_string', () => {
|
|
|
178
138
|
'test_role',
|
|
179
139
|
'--ssl',
|
|
180
140
|
'omit',
|
|
181
|
-
]
|
|
182
|
-
expected: {
|
|
183
|
-
snapshot: true,
|
|
184
|
-
},
|
|
141
|
+
]);
|
|
185
142
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
args: [
|
|
143
|
+
test('connection_string with ssl verify full', async ({ testCliCommand }) => {
|
|
144
|
+
await testCliCommand([
|
|
189
145
|
'connection-string',
|
|
190
146
|
'test_branch',
|
|
191
147
|
'--project-id',
|
|
@@ -196,14 +152,10 @@ describe('connection_string', () => {
|
|
|
196
152
|
'test_role',
|
|
197
153
|
'--ssl',
|
|
198
154
|
'verify-full',
|
|
199
|
-
]
|
|
200
|
-
expected: {
|
|
201
|
-
snapshot: true,
|
|
202
|
-
},
|
|
155
|
+
]);
|
|
203
156
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
args: [
|
|
157
|
+
test('connection_string with lsn', async ({ testCliCommand }) => {
|
|
158
|
+
await testCliCommand([
|
|
207
159
|
'connection-string',
|
|
208
160
|
'test_branch@0/123456',
|
|
209
161
|
'--project-id',
|
|
@@ -212,14 +164,10 @@ describe('connection_string', () => {
|
|
|
212
164
|
'test_db',
|
|
213
165
|
'--role-name',
|
|
214
166
|
'test_role',
|
|
215
|
-
]
|
|
216
|
-
expected: {
|
|
217
|
-
snapshot: true,
|
|
218
|
-
},
|
|
167
|
+
]);
|
|
219
168
|
});
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
args: [
|
|
169
|
+
test('connection_string with timestamp', async ({ testCliCommand }) => {
|
|
170
|
+
await testCliCommand([
|
|
223
171
|
'connection-string',
|
|
224
172
|
'test_branch@2021-01-01T00:00:00Z',
|
|
225
173
|
'--project-id',
|
|
@@ -228,14 +176,10 @@ describe('connection_string', () => {
|
|
|
228
176
|
'test_db',
|
|
229
177
|
'--role-name',
|
|
230
178
|
'test_role',
|
|
231
|
-
]
|
|
232
|
-
expected: {
|
|
233
|
-
snapshot: true,
|
|
234
|
-
},
|
|
179
|
+
]);
|
|
235
180
|
});
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
args: [
|
|
181
|
+
test('connection_string fails for non-existing database', async ({ testCliCommand, }) => {
|
|
182
|
+
await testCliCommand([
|
|
239
183
|
'connection-string',
|
|
240
184
|
'test_branch',
|
|
241
185
|
'--project-id',
|
|
@@ -244,10 +188,9 @@ describe('connection_string', () => {
|
|
|
244
188
|
'non_existing_db',
|
|
245
189
|
'--role-name',
|
|
246
190
|
'test_role',
|
|
247
|
-
],
|
|
248
|
-
expected: {
|
|
191
|
+
], {
|
|
249
192
|
code: 1,
|
|
250
193
|
stderr: expect.stringMatching(/Database not found/),
|
|
251
|
-
}
|
|
194
|
+
});
|
|
252
195
|
});
|
|
253
196
|
});
|
package/commands/databases.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { retryOnLock } from '../api.js';
|
|
2
2
|
import { branchIdFromProps, fillSingleProject } from '../utils/enrichers.js';
|
|
3
3
|
import { writer } from '../writer.js';
|
|
4
|
-
const DATABASE_FIELDS = ['name', 'owner_name', 'created_at'];
|
|
4
|
+
export const DATABASE_FIELDS = ['name', 'owner_name', 'created_at'];
|
|
5
5
|
export const command = 'databases';
|
|
6
6
|
export const describe = 'Manage databases';
|
|
7
7
|
export const aliases = ['database', 'db'];
|
|
@@ -18,7 +18,7 @@ export const builder = (argv) => argv
|
|
|
18
18
|
},
|
|
19
19
|
})
|
|
20
20
|
.middleware(fillSingleProject)
|
|
21
|
-
.command('list', 'List databases', (yargs) => yargs,
|
|
21
|
+
.command('list', 'List databases', (yargs) => yargs, (args) => list(args))
|
|
22
22
|
.command('create', 'Create a database', (yargs) => yargs.options({
|
|
23
23
|
name: {
|
|
24
24
|
describe: 'Database name',
|
|
@@ -29,8 +29,8 @@ export const builder = (argv) => argv
|
|
|
29
29
|
describe: 'Owner name',
|
|
30
30
|
type: 'string',
|
|
31
31
|
},
|
|
32
|
-
}),
|
|
33
|
-
.command('delete <database>', 'Delete a database', (yargs) => yargs,
|
|
32
|
+
}), (args) => create(args))
|
|
33
|
+
.command('delete <database>', 'Delete a database', (yargs) => yargs, (args) => deleteDb(args));
|
|
34
34
|
export const handler = (args) => {
|
|
35
35
|
return args;
|
|
36
36
|
};
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import { describe } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('databases', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: [
|
|
4
|
+
test('list', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand([
|
|
7
6
|
'databases',
|
|
8
7
|
'list',
|
|
9
8
|
'--project-id',
|
|
10
9
|
'test',
|
|
11
10
|
'--branch',
|
|
12
11
|
'test_branch',
|
|
13
|
-
]
|
|
14
|
-
expected: {
|
|
15
|
-
snapshot: true,
|
|
16
|
-
},
|
|
12
|
+
]);
|
|
17
13
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
args: [
|
|
14
|
+
test('create', async ({ testCliCommand }) => {
|
|
15
|
+
await testCliCommand([
|
|
21
16
|
'databases',
|
|
22
17
|
'create',
|
|
23
18
|
'--project-id',
|
|
@@ -28,14 +23,10 @@ describe('databases', () => {
|
|
|
28
23
|
'test_db',
|
|
29
24
|
'--owner-name',
|
|
30
25
|
'test_owner',
|
|
31
|
-
]
|
|
32
|
-
expected: {
|
|
33
|
-
snapshot: true,
|
|
34
|
-
},
|
|
26
|
+
]);
|
|
35
27
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
args: [
|
|
28
|
+
test('delete', async ({ testCliCommand }) => {
|
|
29
|
+
await testCliCommand([
|
|
39
30
|
'databases',
|
|
40
31
|
'delete',
|
|
41
32
|
'test_db',
|
|
@@ -43,9 +34,6 @@ describe('databases', () => {
|
|
|
43
34
|
'test',
|
|
44
35
|
'--branch',
|
|
45
36
|
'test_branch',
|
|
46
|
-
]
|
|
47
|
-
expected: {
|
|
48
|
-
snapshot: true,
|
|
49
|
-
},
|
|
37
|
+
]);
|
|
50
38
|
});
|
|
51
39
|
});
|
package/commands/help.test.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { describe, expect } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('help', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: [],
|
|
7
|
-
expected: {
|
|
4
|
+
test('without args', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand([], {
|
|
8
6
|
stderr: expect.stringContaining(`neonctl <command> [options]`),
|
|
9
|
-
}
|
|
7
|
+
});
|
|
10
8
|
});
|
|
11
9
|
});
|
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
import { describe } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('ip-allow', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: ['ip-allow', 'list', '--project-id', 'test'],
|
|
7
|
-
expected: {
|
|
8
|
-
snapshot: true,
|
|
9
|
-
},
|
|
4
|
+
test('list IP allow', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand(['ip-allow', 'list', '--project-id', 'test']);
|
|
10
6
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
expected: {
|
|
16
|
-
snapshot: true,
|
|
17
|
-
},
|
|
7
|
+
test('list IP Allow with single-project', async ({ testCliCommand }) => {
|
|
8
|
+
await testCliCommand(['ip-allow', 'list'], {
|
|
9
|
+
mockDir: 'single_project',
|
|
10
|
+
});
|
|
18
11
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
args: ['ip-allow', 'add', '--projectId', 'test'],
|
|
22
|
-
expected: {
|
|
12
|
+
test('Add IP allow - Error', async ({ testCliCommand }) => {
|
|
13
|
+
await testCliCommand(['ip-allow', 'add', '--projectId', 'test'], {
|
|
23
14
|
code: 1,
|
|
24
15
|
stderr: `ERROR: Enter individual IP addresses, define ranges with a dash, or use CIDR notation for more flexibility.
|
|
25
|
-
|
|
26
|
-
}
|
|
16
|
+
Example: neonctl ip-allow add 192.168.1.1, 192.168.1.20-192.168.1.50, 192.168.1.0/24 --project-id <id>`,
|
|
17
|
+
});
|
|
27
18
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
args: [
|
|
19
|
+
test('Add IP allow - Primary', async ({ testCliCommand }) => {
|
|
20
|
+
await testCliCommand([
|
|
31
21
|
'ip-allow',
|
|
32
22
|
'add',
|
|
33
23
|
'127.0.0.1',
|
|
@@ -35,14 +25,10 @@ describe('ip-allow', () => {
|
|
|
35
25
|
'--primary-only',
|
|
36
26
|
'--project-id',
|
|
37
27
|
'test',
|
|
38
|
-
]
|
|
39
|
-
expected: {
|
|
40
|
-
snapshot: true,
|
|
41
|
-
},
|
|
28
|
+
]);
|
|
42
29
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
args: [
|
|
30
|
+
test('Add IP allow - Protected', async ({ testCliCommand }) => {
|
|
31
|
+
await testCliCommand([
|
|
46
32
|
'ip-allow',
|
|
47
33
|
'add',
|
|
48
34
|
'127.0.0.1',
|
|
@@ -50,45 +36,35 @@ describe('ip-allow', () => {
|
|
|
50
36
|
'--protected-only',
|
|
51
37
|
'--project-id',
|
|
52
38
|
'test',
|
|
53
|
-
]
|
|
54
|
-
expected: {
|
|
55
|
-
snapshot: true,
|
|
56
|
-
},
|
|
39
|
+
]);
|
|
57
40
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
args: ['ip-allow', 'remove', '--project-id', 'test'],
|
|
61
|
-
expected: {
|
|
41
|
+
test('Remove IP allow - Error', async ({ testCliCommand }) => {
|
|
42
|
+
await testCliCommand(['ip-allow', 'remove', '--project-id', 'test'], {
|
|
62
43
|
code: 1,
|
|
63
44
|
stderr: `ERROR: Remove individual IP addresses and ranges. Example: neonctl ip-allow remove 192.168.1.1 --project-id <id>`,
|
|
64
|
-
}
|
|
45
|
+
});
|
|
65
46
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
47
|
+
test('Remove IP allow', async ({ testCliCommand }) => {
|
|
48
|
+
await testCliCommand([
|
|
49
|
+
'ip-allow',
|
|
50
|
+
'remove',
|
|
51
|
+
'192.168.1.1',
|
|
52
|
+
'--project-id',
|
|
53
|
+
'test',
|
|
54
|
+
]);
|
|
72
55
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
args: ['ip-allow', 'reset', '--project-id', 'test'],
|
|
76
|
-
expected: {
|
|
77
|
-
snapshot: true,
|
|
78
|
-
stdout: `id: test
|
|
79
|
-
name: test_project
|
|
80
|
-
IP_addresses: []
|
|
81
|
-
primary_branch_only: false
|
|
82
|
-
protected_branches_only: false
|
|
83
|
-
`,
|
|
56
|
+
test('Reset IP allow', async ({ testCliCommand }) => {
|
|
57
|
+
await testCliCommand(['ip-allow', 'reset', '--project-id', 'test'], {
|
|
84
58
|
stderr: `INFO: The IP allowlist has been reset. All databases on project "test_project" are now exposed to the internet`,
|
|
85
|
-
}
|
|
59
|
+
});
|
|
86
60
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
61
|
+
test('Reset IP allow to new list', async ({ testCliCommand }) => {
|
|
62
|
+
await testCliCommand([
|
|
63
|
+
'ip-allow',
|
|
64
|
+
'reset',
|
|
65
|
+
'192.168.2.2',
|
|
66
|
+
'--project-id',
|
|
67
|
+
'test',
|
|
68
|
+
]);
|
|
93
69
|
});
|
|
94
70
|
});
|
package/commands/operations.js
CHANGED
|
@@ -13,7 +13,7 @@ export const builder = (argv) => argv
|
|
|
13
13
|
},
|
|
14
14
|
})
|
|
15
15
|
.middleware(fillSingleProject)
|
|
16
|
-
.command('list', 'List operations', (yargs) => yargs,
|
|
16
|
+
.command('list', 'List operations', (yargs) => yargs, (args) => list(args));
|
|
17
17
|
export const handler = (args) => {
|
|
18
18
|
return args;
|
|
19
19
|
};
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { describe } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('operations', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: ['operations', 'list', '--project-id', 'test'],
|
|
7
|
-
expected: {
|
|
8
|
-
snapshot: true,
|
|
9
|
-
},
|
|
4
|
+
test('list', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand(['operations', 'list', '--project-id', 'test']);
|
|
10
6
|
});
|
|
11
7
|
});
|
package/commands/orgs.test.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { describe } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { test } from '../test_utils/fixtures';
|
|
3
3
|
describe('orgs', () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
args: ['orgs', 'list'],
|
|
7
|
-
expected: {
|
|
8
|
-
snapshot: true,
|
|
9
|
-
},
|
|
4
|
+
test('list', async ({ testCliCommand }) => {
|
|
5
|
+
await testCliCommand(['orgs', 'list']);
|
|
10
6
|
});
|
|
11
7
|
});
|