From 4e7c08b10cc64cfad0b8edbd16930d5df2d49dd4 Mon Sep 17 00:00:00 2001 From: Rhys Date: Wed, 24 Jan 2024 10:00:43 -0500 Subject: [PATCH] chore: set browser auth without github actions for mongosh int tests (#672) --- .github/workflows/actions/test-and-build/action.yaml | 8 -------- src/test/suite/oidc.test.ts | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/actions/test-and-build/action.yaml b/.github/workflows/actions/test-and-build/action.yaml index ee400fdd7..07f558515 100644 --- a/.github/workflows/actions/test-and-build/action.yaml +++ b/.github/workflows/actions/test-and-build/action.yaml @@ -69,15 +69,7 @@ runs: if: ${{ runner.os != 'Windows' }} shell: bash - - name: Set BROWSER_AUTH_COMMAND - run: | - BROWSER_AUTH_COMMAND=$(echo "$(which node) $(pwd)/src/test/fixture/curl.js") - echo "BROWSER_AUTH_COMMAND=$BROWSER_AUTH_COMMAND" >> $GITHUB_ENV - shell: bash - - name: Run Tests - env: - BROWSER_AUTH_COMMAND: ${{ env.BROWSER_AUTH_COMMAND }} run: | npm run test shell: bash diff --git a/src/test/suite/oidc.test.ts b/src/test/suite/oidc.test.ts index 2fef7f337..bd5b520ca 100644 --- a/src/test/suite/oidc.test.ts +++ b/src/test/suite/oidc.test.ts @@ -31,8 +31,8 @@ function hash(input: string): string { } // Need to be provided via CI env because we can't get a hold for node.js exec -// path in our tests - they run inside a vscode process -const browserShellCommand = process.env.BROWSER_AUTH_COMMAND; +// path in our tests - they run inside a vscode process in the built dir. +const browserShellCommand = `$(echo "$(which node) ${__dirname}/../../../src/test/fixture/curl.js")`; const UNIQUE_TASK_ID = process.env.GITHUB_RUN_ID && process.env.GITHUB_RUN_NUMBER