Skip to content

Commit 4980de3

Browse files
committed
test/install: Use separate runDir for each test
Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 37b0f81 commit 4980de3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

__tests__/docker/install.test.itg.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {Install, InstallSourceArchive, InstallSourceImage} from '../../src/docke
2323
import {Docker} from '../../src/docker/docker';
2424
import {Exec} from '../../src/exec';
2525

26-
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-install-itg-'));
26+
const tmpDir = () => fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-install-itg-'));
2727

2828
describe('install', () => {
2929
const originalEnv = process.env;
@@ -51,7 +51,7 @@ aarch64:https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-g
5151
await ensureNoSystemContainerd();
5252
const install = new Install({
5353
source: source,
54-
runDir: tmpDir,
54+
runDir: tmpDir(),
5555
contextName: 'foo',
5656
daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`
5757
});
@@ -74,7 +74,7 @@ describe('rootless', () => {
7474
await ensureNoSystemContainerd();
7575
const install = new Install({
7676
source: source,
77-
runDir: tmpDir,
77+
runDir: tmpDir(),
7878
contextName: 'foo',
7979
daemonConfig: `{"debug":true}`,
8080
rootless: true

0 commit comments

Comments
 (0)