@exagone313/dsh-podman 1.0.3 → 1.0.4

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 (89) hide show
  1. package/dist/generated/version.d.ts +2 -2
  2. package/dist/generated/version.js +2 -2
  3. package/docs/development.md +8 -4
  4. package/docs/development.zh.md +7 -4
  5. package/package.json +3 -1
  6. package/dist/approval-reasons.test.d.ts +0 -1
  7. package/dist/approval-reasons.test.js +0 -143
  8. package/dist/approval.test.d.ts +0 -1
  9. package/dist/approval.test.js +0 -593
  10. package/dist/card-route.test.d.ts +0 -1
  11. package/dist/card-route.test.js +0 -223
  12. package/dist/card-test-support.d.ts +0 -15
  13. package/dist/card-test-support.js +0 -133
  14. package/dist/container-env.test.d.ts +0 -1
  15. package/dist/container-env.test.js +0 -93
  16. package/dist/containers.test.d.ts +0 -1
  17. package/dist/containers.test.js +0 -621
  18. package/dist/daemons.test.d.ts +0 -1
  19. package/dist/daemons.test.js +0 -167
  20. package/dist/dsh-version.test.d.ts +0 -1
  21. package/dist/dsh-version.test.js +0 -25
  22. package/dist/env-rows.test.d.ts +0 -1
  23. package/dist/env-rows.test.js +0 -43
  24. package/dist/fs-provider.test.d.ts +0 -1
  25. package/dist/fs-provider.test.js +0 -301
  26. package/dist/guest-rpc.test.d.ts +0 -1
  27. package/dist/guest-rpc.test.js +0 -241
  28. package/dist/images.test.d.ts +0 -1
  29. package/dist/images.test.js +0 -86
  30. package/dist/locales.test.d.ts +0 -1
  31. package/dist/locales.test.js +0 -34
  32. package/dist/misc.test.d.ts +0 -1
  33. package/dist/misc.test.js +0 -169
  34. package/dist/mounts.test.d.ts +0 -1
  35. package/dist/mounts.test.js +0 -478
  36. package/dist/naming.test.d.ts +0 -1
  37. package/dist/naming.test.js +0 -28
  38. package/dist/package-deps.test.d.ts +0 -1
  39. package/dist/package-deps.test.js +0 -49
  40. package/dist/paths.test.d.ts +0 -1
  41. package/dist/paths.test.js +0 -76
  42. package/dist/plugin-meta.test.d.ts +0 -1
  43. package/dist/plugin-meta.test.js +0 -29
  44. package/dist/project-path.test.d.ts +0 -1
  45. package/dist/project-path.test.js +0 -66
  46. package/dist/read-only-shell.test.d.ts +0 -1
  47. package/dist/read-only-shell.test.js +0 -182
  48. package/dist/runtime-client.test.d.ts +0 -1
  49. package/dist/runtime-client.test.js +0 -53
  50. package/dist/secrets.test.d.ts +0 -1
  51. package/dist/secrets.test.js +0 -196
  52. package/dist/settings-commands.test.d.ts +0 -1
  53. package/dist/settings-commands.test.js +0 -596
  54. package/dist/settings-create.test.d.ts +0 -1
  55. package/dist/settings-create.test.js +0 -416
  56. package/dist/settings-default-env.test.d.ts +0 -1
  57. package/dist/settings-default-env.test.js +0 -175
  58. package/dist/settings-mounts.test.d.ts +0 -1
  59. package/dist/settings-mounts.test.js +0 -506
  60. package/dist/settings-paths.test.d.ts +0 -1
  61. package/dist/settings-paths.test.js +0 -65
  62. package/dist/settings-schema.test.d.ts +0 -1
  63. package/dist/settings-schema.test.js +0 -35
  64. package/dist/settings-workspaces.test.d.ts +0 -1
  65. package/dist/settings-workspaces.test.js +0 -240
  66. package/dist/spill-store.test.d.ts +0 -1
  67. package/dist/spill-store.test.js +0 -82
  68. package/dist/subprocess.test.d.ts +0 -1
  69. package/dist/subprocess.test.js +0 -344
  70. package/dist/terminal-preference.test.d.ts +0 -1
  71. package/dist/terminal-preference.test.js +0 -62
  72. package/dist/terminal-route.test.d.ts +0 -1
  73. package/dist/terminal-route.test.js +0 -265
  74. package/dist/terminal-tab.test.d.ts +0 -1
  75. package/dist/terminal-tab.test.js +0 -58
  76. package/dist/terminal-targets.test.d.ts +0 -1
  77. package/dist/terminal-targets.test.js +0 -43
  78. package/dist/terminal-titles.test.d.ts +0 -1
  79. package/dist/terminal-titles.test.js +0 -36
  80. package/dist/test-support.d.ts +0 -358
  81. package/dist/test-support.js +0 -499
  82. package/dist/version-compat.test.d.ts +0 -1
  83. package/dist/version-compat.test.js +0 -27
  84. package/dist/views.test.d.ts +0 -1
  85. package/dist/views.test.js +0 -23
  86. package/dist/volumes.test.d.ts +0 -1
  87. package/dist/volumes.test.js +0 -40
  88. package/dist/workspace-binding.test.d.ts +0 -1
  89. package/dist/workspace-binding.test.js +0 -523
@@ -1,416 +0,0 @@
1
- // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
2
- //
3
- // SPDX-License-Identifier: MIT
4
- import { test } from "node:test";
5
- import { strict as assert } from "node:assert";
6
- import { baseValue, fakeContext, fakeScope } from "./card-test-support.js";
7
- import { installCardCommandDriver } from "./card-test-support.js";
8
- test("create command sends PATH additions", async () => {
9
- const scope = fakeScope(baseValue());
10
- const calls = [];
11
- const resolver = {
12
- getConfig: () => ({}),
13
- setConfig: () => { },
14
- async control(method, request) {
15
- calls.push([method, request]);
16
- if (method === "listContainers")
17
- return { containers: [] };
18
- if (method === "listImages")
19
- return { images: [] };
20
- if (method === "listWorkspaces")
21
- return { workspaces: [] };
22
- return {};
23
- },
24
- };
25
- await installCardCommandDriver(fakeContext(scope), resolver);
26
- await scope.update({
27
- command: {
28
- op: "create",
29
- workspace: "w1",
30
- projectName: "w1",
31
- image: "img1",
32
- at: 1,
33
- mounts: [],
34
- paths: ["/opt/bin"],
35
- env: {},
36
- container: "",
37
- secretEnv: {},
38
- mount: null,
39
- },
40
- });
41
- await new Promise((resolve) => setImmediate(resolve));
42
- const createCall = calls.find(([method]) => method === "createWorkspace");
43
- assert.deepEqual(createCall?.[1], {
44
- workspaceSlug: "w1",
45
- projectName: "w1",
46
- imageId: "img1",
47
- paths: ["/opt/bin"],
48
- });
49
- const calls2 = [];
50
- const resolver2 = {
51
- getConfig: () => ({}),
52
- setConfig: () => { },
53
- async control(method, request) {
54
- calls2.push([method, request]);
55
- if (method === "listContainers")
56
- return { containers: [] };
57
- if (method === "listImages")
58
- return { images: [] };
59
- if (method === "listWorkspaces")
60
- return { workspaces: [] };
61
- return {};
62
- },
63
- };
64
- const scope2 = fakeScope(baseValue());
65
- await installCardCommandDriver(fakeContext(scope2), resolver2);
66
- await scope2.update({
67
- command: {
68
- op: "create",
69
- workspace: "w1",
70
- container: "dev",
71
- image: "img1",
72
- at: 2,
73
- mounts: [],
74
- paths: ["/opt/bin", "/usr/local/bin"],
75
- env: {},
76
- secretEnv: {},
77
- mount: null,
78
- },
79
- });
80
- await new Promise((resolve) => setImmediate(resolve));
81
- const startCall = calls2.find(([method]) => method === "startContainer");
82
- assert.deepEqual(startCall?.[1], {
83
- workspaceSlug: "w1",
84
- imageId: "img1",
85
- container: "dev",
86
- paths: ["/opt/bin", "/usr/local/bin"],
87
- });
88
- });
89
- test("volume_create command drives createVolume with the name", async () => {
90
- const scope = fakeScope(baseValue());
91
- const calls = [];
92
- const resolver = {
93
- getConfig: () => ({}),
94
- setConfig: () => { },
95
- async control(method, request) {
96
- calls.push([method, request]);
97
- if (method === "listContainers")
98
- return { containers: [] };
99
- if (method === "listImages")
100
- return { images: [] };
101
- if (method === "listWorkspaces")
102
- return { workspaces: [] };
103
- if (method === "listVolumes")
104
- return { volumes: [] };
105
- return {};
106
- },
107
- };
108
- await installCardCommandDriver(fakeContext(scope), resolver);
109
- await scope.update({
110
- command: { op: "volume_create", workspace: "data", image: "", at: 3 },
111
- });
112
- await new Promise((resolve) => setImmediate(resolve));
113
- const createCall = calls.find(([method]) => method === "createVolume");
114
- assert.deepEqual(createCall?.[1], { name: "data" });
115
- assert.equal(scope.value.command, null);
116
- });
117
- test("secret_create command drives createSecret with the name", async () => {
118
- const scope = fakeScope(baseValue());
119
- const calls = [];
120
- const resolver = {
121
- getConfig: () => ({}),
122
- setConfig: () => { },
123
- async control(method, request) {
124
- calls.push([method, request]);
125
- if (method === "listContainers")
126
- return { containers: [] };
127
- if (method === "listImages")
128
- return { images: [] };
129
- if (method === "listWorkspaces")
130
- return { workspaces: [] };
131
- if (method === "listVolumes")
132
- return { volumes: [] };
133
- if (method === "listSecrets")
134
- return { secrets: [] };
135
- return {};
136
- },
137
- };
138
- await installCardCommandDriver(fakeContext(scope), resolver);
139
- await scope.update({
140
- command: {
141
- op: "secret_create",
142
- workspace: "db-pass",
143
- image: "",
144
- at: 6,
145
- mounts: [],
146
- value: "",
147
- },
148
- });
149
- await new Promise((resolve) => setImmediate(resolve));
150
- const createCall = calls.find(([method]) => method === "createSecret");
151
- assert.deepEqual(createCall?.[1], { name: "db-pass" });
152
- assert.equal(scope.value.command, null);
153
- });
154
- test("secret_create command drives createSecret with length when provided", async () => {
155
- const scope = fakeScope(baseValue());
156
- const calls = [];
157
- const resolver = {
158
- getConfig: () => ({}),
159
- setConfig: () => { },
160
- async control(method, request) {
161
- calls.push([method, request]);
162
- if (method === "listContainers")
163
- return { containers: [] };
164
- if (method === "listImages")
165
- return { images: [] };
166
- if (method === "listWorkspaces")
167
- return { workspaces: [] };
168
- if (method === "listVolumes")
169
- return { volumes: [] };
170
- if (method === "listSecrets")
171
- return { secrets: [] };
172
- return {};
173
- },
174
- };
175
- await installCardCommandDriver(fakeContext(scope), resolver);
176
- await scope.update({
177
- command: {
178
- op: "secret_create",
179
- workspace: "s",
180
- image: "",
181
- at: 11,
182
- length: 48,
183
- },
184
- });
185
- await new Promise((resolve) => setImmediate(resolve));
186
- const createCall = calls.find(([method]) => method === "createSecret");
187
- assert.deepEqual(createCall?.[1], { name: "s", length: 48 });
188
- assert.equal(scope.value.command, null);
189
- });
190
- test("secret_create command drives createSecret without length when omitted", async () => {
191
- const scope = fakeScope(baseValue());
192
- const calls = [];
193
- const resolver = {
194
- getConfig: () => ({}),
195
- setConfig: () => { },
196
- async control(method, request) {
197
- calls.push([method, request]);
198
- if (method === "listContainers")
199
- return { containers: [] };
200
- if (method === "listImages")
201
- return { images: [] };
202
- if (method === "listWorkspaces")
203
- return { workspaces: [] };
204
- if (method === "listVolumes")
205
- return { volumes: [] };
206
- if (method === "listSecrets")
207
- return { secrets: [] };
208
- return {};
209
- },
210
- };
211
- await installCardCommandDriver(fakeContext(scope), resolver);
212
- await scope.update({
213
- command: { op: "secret_create", workspace: "s", image: "", at: 12 },
214
- });
215
- await new Promise((resolve) => setImmediate(resolve));
216
- const createCall = calls.find(([method]) => method === "createSecret");
217
- assert.deepEqual(createCall?.[1], { name: "s" });
218
- assert.equal(scope.value.command, null);
219
- });
220
- test("secret_create command drives createSecret with charset when provided", async () => {
221
- const scope = fakeScope(baseValue());
222
- const calls = [];
223
- const resolver = {
224
- getConfig: () => ({}),
225
- setConfig: () => { },
226
- async control(method, request) {
227
- calls.push([method, request]);
228
- if (method === "listContainers")
229
- return { containers: [] };
230
- if (method === "listImages")
231
- return { images: [] };
232
- if (method === "listWorkspaces")
233
- return { workspaces: [] };
234
- if (method === "listVolumes")
235
- return { volumes: [] };
236
- if (method === "listSecrets")
237
- return { secrets: [] };
238
- return {};
239
- },
240
- };
241
- await installCardCommandDriver(fakeContext(scope), resolver);
242
- await scope.update({
243
- command: {
244
- op: "secret_create",
245
- workspace: "tok",
246
- length: 48,
247
- charset: "hex",
248
- },
249
- });
250
- await new Promise((resolve) => setImmediate(resolve));
251
- const createCall = calls.find(([method]) => method === "createSecret");
252
- assert.deepEqual(createCall?.[1], {
253
- name: "tok",
254
- length: 48,
255
- charset: "hex",
256
- });
257
- assert.equal(scope.value.command, null);
258
- });
259
- test("recreate command drives recreateContainer with env", async () => {
260
- const scope = fakeScope(baseValue());
261
- const calls = [];
262
- const resolver = {
263
- getConfig: () => ({}),
264
- setConfig: () => { },
265
- async control(method, request) {
266
- calls.push([method, request]);
267
- if (method === "listContainers")
268
- return { containers: [] };
269
- if (method === "listImages")
270
- return { images: [] };
271
- if (method === "listWorkspaces")
272
- return { workspaces: [] };
273
- return {};
274
- },
275
- };
276
- await installCardCommandDriver(fakeContext(scope), resolver);
277
- await scope.update({
278
- command: {
279
- op: "recreate",
280
- workspace: "w1",
281
- image: "img2",
282
- at: 15,
283
- env: { A: "1" },
284
- },
285
- });
286
- await new Promise((resolve) => setImmediate(resolve));
287
- const recreateCall = calls.find(([method]) => method === "recreateContainer");
288
- assert.deepEqual(recreateCall?.[1], {
289
- workspaceSlug: "w1",
290
- imageId: "img2",
291
- env: { A: "1" },
292
- });
293
- assert.equal(scope.value.command, null);
294
- });
295
- test("create command with a container name routes to startContainer", async () => {
296
- const scope = fakeScope(baseValue());
297
- const calls = [];
298
- const resolver = {
299
- getConfig: () => ({}),
300
- setConfig: () => { },
301
- async control(method, request) {
302
- calls.push([method, request]);
303
- if (method === "listContainers")
304
- return { containers: [] };
305
- if (method === "listImages")
306
- return { images: [] };
307
- if (method === "listWorkspaces")
308
- return { workspaces: [] };
309
- return {};
310
- },
311
- };
312
- await installCardCommandDriver(fakeContext(scope), resolver);
313
- await scope.update({
314
- command: {
315
- op: "create",
316
- workspace: "w1",
317
- container: "dev",
318
- image: "img1",
319
- at: 1,
320
- mounts: [],
321
- env: {},
322
- secretEnv: {},
323
- mount: null,
324
- },
325
- });
326
- await new Promise((resolve) => setImmediate(resolve));
327
- const startCall = calls.find(([method]) => method === "startContainer");
328
- assert.deepEqual(startCall?.[1], {
329
- workspaceSlug: "w1",
330
- imageId: "img1",
331
- container: "dev",
332
- });
333
- assert.equal(calls.some(([method]) => method === "createWorkspace"), false, "a create command with a container name must not create a workspace");
334
- assert.equal(scope.value.command, null);
335
- });
336
- test("create command sends secret env", async () => {
337
- const scope = fakeScope(baseValue());
338
- const calls = [];
339
- const resolver = {
340
- getConfig: () => ({}),
341
- setConfig: () => { },
342
- async control(method, request) {
343
- calls.push([method, request]);
344
- if (method === "listContainers")
345
- return { containers: [] };
346
- if (method === "listImages")
347
- return { images: [] };
348
- if (method === "listWorkspaces")
349
- return { workspaces: [] };
350
- return {};
351
- },
352
- };
353
- await installCardCommandDriver(fakeContext(scope), resolver);
354
- await scope.update({
355
- command: {
356
- op: "create",
357
- workspace: "w1",
358
- projectName: "w1",
359
- image: "img1",
360
- at: 1,
361
- mounts: [],
362
- env: {},
363
- container: "",
364
- secretEnv: { VALKEY_PASSWORD: "valkey-tls" },
365
- mount: null,
366
- },
367
- });
368
- await new Promise((resolve) => setImmediate(resolve));
369
- const createCall = calls.find(([method]) => method === "createWorkspace");
370
- assert.deepEqual(createCall?.[1], {
371
- workspaceSlug: "w1",
372
- projectName: "w1",
373
- imageId: "img1",
374
- secretEnv: { VALKEY_PASSWORD: "valkey-tls" },
375
- });
376
- assert.equal(scope.value.command, null);
377
- const calls2 = [];
378
- const resolver2 = {
379
- getConfig: () => ({}),
380
- setConfig: () => { },
381
- async control(method, request) {
382
- calls2.push([method, request]);
383
- if (method === "listContainers")
384
- return { containers: [] };
385
- if (method === "listImages")
386
- return { images: [] };
387
- if (method === "listWorkspaces")
388
- return { workspaces: [] };
389
- return {};
390
- },
391
- };
392
- const scope2 = fakeScope(baseValue());
393
- await installCardCommandDriver(fakeContext(scope2), resolver2);
394
- await scope2.update({
395
- command: {
396
- op: "create",
397
- workspace: "w1",
398
- projectName: "w1",
399
- image: "img1",
400
- at: 2,
401
- mounts: [],
402
- env: {},
403
- container: "",
404
- secretEnv: {},
405
- mount: null,
406
- },
407
- });
408
- await new Promise((resolve) => setImmediate(resolve));
409
- const createCall2 = calls2.find(([method]) => method === "createWorkspace");
410
- assert.deepEqual(createCall2?.[1], {
411
- workspaceSlug: "w1",
412
- projectName: "w1",
413
- imageId: "img1",
414
- });
415
- assert.equal(scope2.value.command, null);
416
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,175 +0,0 @@
1
- // SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
2
- //
3
- // SPDX-License-Identifier: MIT
4
- // The default container environment through the settings card: seeding on
5
- // creation, authoritative recreates, and the synchronisation into existing
6
- // containers.
7
- import { test } from "node:test";
8
- import { strict as assert } from "node:assert";
9
- import { baseValue, fakeContext, fakeScope, installCardCommandDriver, } from "./card-test-support.js";
10
- const DEFAULTS = {
11
- GIT_AUTHOR_NAME: "John Doe",
12
- GIT_AUTHOR_EMAIL: "john.doe@git.example",
13
- };
14
- function driver(containerEnv, containers = []) {
15
- const scope = fakeScope(baseValue());
16
- const calls = [];
17
- const resolver = {
18
- getConfig: () => (containerEnv === undefined ? {} : { containerEnv }),
19
- setConfig: () => { },
20
- async control(method, request) {
21
- calls.push([method, request]);
22
- if (method === "listContainers")
23
- return { containers };
24
- if (method === "listImages")
25
- return { images: [] };
26
- if (method === "listWorkspaces")
27
- return { workspaces: [] };
28
- return {};
29
- },
30
- };
31
- return { scope, calls, resolver };
32
- }
33
- const settle = () => new Promise((resolve) => setImmediate(resolve));
34
- test("create seeds the default environment into a new workspace", async () => {
35
- const { scope, calls, resolver } = driver(DEFAULTS);
36
- await installCardCommandDriver(fakeContext(scope), resolver);
37
- await scope.update({
38
- command: {
39
- op: "create",
40
- workspace: "w1",
41
- projectName: "team",
42
- image: "img1",
43
- mounts: [],
44
- env: { EXTRA: "1" },
45
- container: "",
46
- },
47
- });
48
- await settle();
49
- const create = calls.find(([method]) => method === "createWorkspace");
50
- assert.deepEqual(create?.[1].env, { ...DEFAULTS, EXTRA: "1" });
51
- });
52
- test("create seeds the default environment into a new named container", async () => {
53
- const { scope, calls, resolver } = driver(DEFAULTS);
54
- await installCardCommandDriver(fakeContext(scope), resolver);
55
- await scope.update({
56
- command: {
57
- op: "create",
58
- workspace: "w1",
59
- container: "web",
60
- image: "img1",
61
- mounts: [],
62
- env: {},
63
- },
64
- });
65
- await settle();
66
- const start = calls.find(([method]) => method === "startContainer");
67
- assert.deepEqual(start?.[1].env, DEFAULTS);
68
- assert.equal(start?.[1].container, "web");
69
- });
70
- test("recreate is authoritative and does not re-seed the defaults", async () => {
71
- const { scope, calls, resolver } = driver(DEFAULTS);
72
- await installCardCommandDriver(fakeContext(scope), resolver);
73
- await scope.update({
74
- command: {
75
- op: "recreate",
76
- workspace: "w1",
77
- image: "",
78
- env: { EXTRA: "1" },
79
- },
80
- });
81
- await settle();
82
- const recreate = calls.find(([method]) => method === "recreateContainer");
83
- assert.deepEqual(recreate?.[1].env, { EXTRA: "1" });
84
- });
85
- test("default_env_sync adds only missing keys to running containers", async () => {
86
- const containers = [
87
- {
88
- workspaceSlug: "w1",
89
- containerName: "default",
90
- status: "running",
91
- env: { EXTRA: "1" },
92
- },
93
- {
94
- workspaceSlug: "w1",
95
- containerName: "web",
96
- status: "running",
97
- env: { ...DEFAULTS },
98
- },
99
- {
100
- workspaceSlug: "w2",
101
- containerName: "default",
102
- status: "stopped",
103
- env: {},
104
- },
105
- ];
106
- const { scope, calls, resolver } = driver(DEFAULTS, containers);
107
- await installCardCommandDriver(fakeContext(scope), resolver);
108
- await scope.update({ command: { op: "default_env_sync", workspace: "" } });
109
- await settle();
110
- const recreates = calls.filter(([method]) => method === "recreateContainer");
111
- assert.deepEqual(recreates.map(([, request]) => request), [
112
- {
113
- workspaceSlug: "w1",
114
- container: "default",
115
- env: { ...DEFAULTS, EXTRA: "1" },
116
- },
117
- ], "only the incomplete running container is recreated, with existing values kept");
118
- assert.equal(scope.value.notice, "applied the default environment to 1 container; 1 container stopped, to pick up on their next start");
119
- });
120
- test("default_env_sync honors a workspace filter", async () => {
121
- const containers = [
122
- {
123
- workspaceSlug: "w1",
124
- containerName: "default",
125
- status: "running",
126
- env: {},
127
- },
128
- {
129
- workspaceSlug: "w2",
130
- containerName: "default",
131
- status: "running",
132
- env: {},
133
- },
134
- ];
135
- const { scope, calls, resolver } = driver(DEFAULTS, containers);
136
- await installCardCommandDriver(fakeContext(scope), resolver);
137
- await scope.update({ command: { op: "default_env_sync", workspace: "w2" } });
138
- await settle();
139
- const recreates = calls.filter(([method]) => method === "recreateContainer");
140
- assert.deepEqual(recreates.map(([, request]) => request), [
141
- { workspaceSlug: "w2", container: "default", env: DEFAULTS },
142
- ]);
143
- });
144
- test("default_env_sync reports nothing to do when the defaults are absent", async () => {
145
- const { scope, calls, resolver } = driver(undefined, [
146
- {
147
- workspaceSlug: "w1",
148
- containerName: "default",
149
- status: "running",
150
- env: {},
151
- },
152
- ]);
153
- await installCardCommandDriver(fakeContext(scope), resolver);
154
- await calls.splice(0);
155
- await scope.update({ command: { op: "default_env_sync", workspace: "" } });
156
- await settle();
157
- assert.equal(calls.some(([method]) => method === "recreateContainer"), false);
158
- assert.equal(scope.value.notice, "");
159
- });
160
- test("default_env_sync reports an already-complete state", async () => {
161
- const containers = [
162
- {
163
- workspaceSlug: "w1",
164
- containerName: "default",
165
- status: "running",
166
- env: { ...DEFAULTS },
167
- },
168
- ];
169
- const { scope, calls, resolver } = driver(DEFAULTS, containers);
170
- await installCardCommandDriver(fakeContext(scope), resolver);
171
- await scope.update({ command: { op: "default_env_sync", workspace: "" } });
172
- await settle();
173
- assert.equal(calls.some(([method]) => method === "recreateContainer"), false);
174
- assert.equal(scope.value.notice, "the default environment is already applied to every running container");
175
- });
@@ -1 +0,0 @@
1
- export {};