From 933955ae47ee062f7436bb531a62b11bcb7bf20b Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Sat, 21 Oct 2023 23:37:51 -0700 Subject: [PATCH] test: avoid colliding sandboxes (#1019) --- test/npm/test-npm-install.js | 2 +- test/npm/test-npm-test.js | 2 +- test/reporter/test-reporter-junit.js | 2 +- test/reporter/test-reporter-tap.js | 2 +- test/test-grab-project.js | 2 +- test/test-timeout.js | 2 +- test/yarn/test-yarn-install.js | 2 +- test/yarn/test-yarn-test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/npm/test-npm-install.js b/test/npm/test-npm-install.js index eba39231..f3f6bb28 100644 --- a/test/npm/test-npm-install.js +++ b/test/npm/test-npm-install.js @@ -12,7 +12,7 @@ import { npmContext } from '../helpers/make-context.js'; const { test } = tap; const __dirname = dirname(fileURLToPath(import.meta.url)); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-npm-install`); const fixtures = join(__dirname, '..', 'fixtures'); const moduleFixtures = join(fixtures, 'omg-i-pass'); const moduleTemp = join(sandbox, 'omg-i-pass'); diff --git a/test/npm/test-npm-test.js b/test/npm/test-npm-test.js index 17669a45..4a2938d0 100644 --- a/test/npm/test-npm-test.js +++ b/test/npm/test-npm-test.js @@ -12,7 +12,7 @@ import { test as packageManagerTest } from '../../lib/package-manager/test.js'; const { test } = tap; const __dirname = dirname(fileURLToPath(import.meta.url)); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-npm-test`); const fixtures = join(__dirname, '..', 'fixtures'); const passFixtures = join(fixtures, 'omg-i-pass'); diff --git a/test/reporter/test-reporter-junit.js b/test/reporter/test-reporter-junit.js index 64bb2445..2ceaeaf8 100644 --- a/test/reporter/test-reporter-junit.js +++ b/test/reporter/test-reporter-junit.js @@ -22,7 +22,7 @@ const fixturesPath = join( '..', 'fixtures' ); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-test-reporter-junit`); const outputFile = join(sandbox, 'test.xml'); const outputFileAppend = join(sandbox, 'test-append.xml'); diff --git a/test/reporter/test-reporter-tap.js b/test/reporter/test-reporter-tap.js index b4f6b67c..22cf135c 100644 --- a/test/reporter/test-reporter-tap.js +++ b/test/reporter/test-reporter-tap.js @@ -22,7 +22,7 @@ const fixturesPath = join( '..', 'fixtures' ); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-test-reporter-tap`); const outputFile = join(sandbox, 'test.tap'); const outputFileAppend = join(sandbox, 'test-append.tap'); const outputFileAppendBlank = join(sandbox, 'test-append-blank.tap'); diff --git a/test/test-grab-project.js b/test/test-grab-project.js index 749da462..6d05345e 100644 --- a/test/test-grab-project.js +++ b/test/test-grab-project.js @@ -14,7 +14,7 @@ import { grabProject } from '../lib/grab-project.js'; const { test } = tap; const __dirname = dirname(fileURLToPath(import.meta.url)); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-grab-project`); const fixtures = join(__dirname, 'fixtures'); test('grab-project: setup', async () => { diff --git a/test/test-timeout.js b/test/test-timeout.js index 933f330d..1c360d34 100644 --- a/test/test-timeout.js +++ b/test/test-timeout.js @@ -10,7 +10,7 @@ import { npmContext } from './helpers/make-context.js'; const { test } = tap; -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-test-timeout`); let packageManagers; diff --git a/test/yarn/test-yarn-install.js b/test/yarn/test-yarn-install.js index 92619666..399d8a76 100644 --- a/test/yarn/test-yarn-install.js +++ b/test/yarn/test-yarn-install.js @@ -11,7 +11,7 @@ import { npmContext } from '../helpers/make-context.js'; const { test } = tap; -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-yarn-install`); const fixtures = join( dirname(fileURLToPath(import.meta.url)), '..', diff --git a/test/yarn/test-yarn-test.js b/test/yarn/test-yarn-test.js index e14ea352..deded643 100644 --- a/test/yarn/test-yarn-test.js +++ b/test/yarn/test-yarn-test.js @@ -11,7 +11,7 @@ import { test as packageManagerTest } from '../../lib/package-manager/test.js'; const __dirname = dirname(fileURLToPath(import.meta.url)); -const sandbox = join(tmpdir(), `citgm-${Date.now()}`); +const sandbox = join(tmpdir(), `citgm-${Date.now()}-yarn-test`); const fixtures = join(__dirname, '..', 'fixtures'); const passFixtures = join(fixtures, 'omg-i-pass');