From 4980de30fc7c05897a6471459eb572f00b1d3dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 8 Nov 2024 16:44:41 +0100 Subject: [PATCH] test/install: Use separate runDir for each test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- __tests__/docker/install.test.itg.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/docker/install.test.itg.ts b/__tests__/docker/install.test.itg.ts index 1bf9816..b960e77 100644 --- a/__tests__/docker/install.test.itg.ts +++ b/__tests__/docker/install.test.itg.ts @@ -23,7 +23,7 @@ import {Install, InstallSourceArchive, InstallSourceImage} from '../../src/docke import {Docker} from '../../src/docker/docker'; import {Exec} from '../../src/exec'; -const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-install-itg-')); +const tmpDir = () => fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-install-itg-')); describe('install', () => { const originalEnv = process.env; @@ -51,7 +51,7 @@ aarch64:https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-g await ensureNoSystemContainerd(); const install = new Install({ source: source, - runDir: tmpDir, + runDir: tmpDir(), contextName: 'foo', daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}` }); @@ -74,7 +74,7 @@ describe('rootless', () => { await ensureNoSystemContainerd(); const install = new Install({ source: source, - runDir: tmpDir, + runDir: tmpDir(), contextName: 'foo', daemonConfig: `{"debug":true}`, rootless: true