From 832ae51d3d76fddb2ffa4eb390b291a645496881 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 22 Aug 2023 11:07:53 +0200 Subject: [PATCH] Use home folder --- src/test/container-features/registryCompatibilityOCI.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/container-features/registryCompatibilityOCI.test.ts b/src/test/container-features/registryCompatibilityOCI.test.ts index 64cbcb629..1a19966d6 100644 --- a/src/test/container-features/registryCompatibilityOCI.test.ts +++ b/src/test/container-features/registryCompatibilityOCI.test.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { assert } from 'chai'; +import * as os from 'os'; import * as path from 'path'; import { devContainerDown, devContainerUp, shellExec } from '../testUtils'; @@ -122,7 +123,7 @@ describe('Registry Compatibility', function () { describe(name, async function () { ((authStrategyKey && !envVariableExists(authStrategyKey)) ? describe.skip : describe)('devcontainer up', async function () { - const authFolder = constructAuthFromStrategy(tmp, useAuthStrategy ?? AuthStrategy.Anonymous, authStrategyKey) || '/fake-path'; + const authFolder = constructAuthFromStrategy(tmp, useAuthStrategy ?? AuthStrategy.Anonymous, authStrategyKey) || path.join(os.homedir(), 'fake-path'); const gitHubToken = (useAuthStrategy === AuthStrategy.GitHubToken) ? (process.env.GITHUB_TOKEN ?? '') : ''; let containerId: string | null = null; @@ -145,7 +146,7 @@ describe('Registry Compatibility', function () { ((authStrategyKey && !envVariableExists(authStrategyKey)) ? describe.skip : describe)(`devcontainer features info manifest`, async function () { - const authFolder = constructAuthFromStrategy(tmp, useAuthStrategy ?? AuthStrategy.Anonymous, authStrategyKey) || '/fake-path'; + const authFolder = constructAuthFromStrategy(tmp, useAuthStrategy ?? AuthStrategy.Anonymous, authStrategyKey) || path.join(os.homedir(), 'fake-path'); const gitHubToken = (useAuthStrategy === AuthStrategy.GitHubToken) ? (process.env.GITHUB_TOKEN ?? '') : ''; it('fetches manifest', async function () {