|
1 | 1 | import { describe, it, expect } from 'vitest' |
| 2 | + |
| 3 | +const isWindows = process.platform === 'win32' |
2 | 4 | import { validateSandboxPath } from '../src/sandbox/backend.js' |
3 | 5 | import { DockerBackend, BUILTIN_SECCOMP_PROFILE } from '../src/sandbox/backends/docker.js' |
4 | 6 | import { ShuruBackend, isShuruAvailable } from '../src/sandbox/backends/shuru.js' |
@@ -162,7 +164,7 @@ describe('sandbox/backends/docker — BUILTIN_SECCOMP_PROFILE', () => { |
162 | 164 | }) |
163 | 165 |
|
164 | 166 | describe('sandbox/backends/docker — destroy clears state even on failure', () => { |
165 | | - it('clears containerId and isRunning before attempting docker rm', async () => { |
| 167 | + it.skipIf(isWindows)('clears containerId and isRunning before attempting docker rm', async () => { |
166 | 168 | // By inspecting the source, destroy() sets containerId = null and |
167 | 169 | // _isRunning = false BEFORE calling execFileAsync('docker', ['rm'...]). |
168 | 170 | // This guarantees state is cleared even if docker rm throws. |
@@ -193,7 +195,7 @@ describe('sandbox/backends/docker — destroy clears state even on failure', () |
193 | 195 | await expect(b.destroy()).resolves.toBeUndefined() |
194 | 196 | }) |
195 | 197 |
|
196 | | - it('double destroy is safe', async () => { |
| 198 | + it.skipIf(isWindows)('double destroy is safe', async () => { |
197 | 199 | const b = new DockerBackend() |
198 | 200 | const bAny = b as any |
199 | 201 | bAny.containerId = 'fake-id' |
|
0 commit comments