diff --git a/.github/workflows/pr_checks.yaml b/.github/workflows/pr_checks.yaml index eec79f4c6..a359b75cd 100644 --- a/.github/workflows/pr_checks.yaml +++ b/.github/workflows/pr_checks.yaml @@ -408,6 +408,7 @@ jobs: run: | cd core npm test + npm run vitest env: IGNORE_API_KEY_TESTS: ${{ github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]' }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} diff --git a/core/config/yaml/LocalPlatformClient.test.ts b/core/config/yaml/LocalPlatformClient.test.ts index 273d840c6..a91017ed2 100644 --- a/core/config/yaml/LocalPlatformClient.test.ts +++ b/core/config/yaml/LocalPlatformClient.test.ts @@ -166,6 +166,8 @@ describe("LocalPlatformClient", () => { testFQSN2, ]); + // both the secrets should be present as they are retrieved from different files + expect(resolvedFQSNs.length).toBe(2); const continueDirSecretValue = ( @@ -174,7 +176,6 @@ describe("LocalPlatformClient", () => { const dotEnvSecretValue = ( resolvedFQSNs[1] as SecretResult & { value: unknown } )?.value; - expect(continueDirSecretValue).toContain(secretValue); expect(continueDirSecretValue).toContain(randomValueForContinueDirDotEnv); expect(dotEnvSecretValue).toContain(secretValue + "-workspace"); @@ -217,10 +218,10 @@ describe("LocalPlatformClient", () => { const resolvedFQSNs = await localPlatformClient.resolveFQSNs([testFQSN]); expect(resolvedFQSNs.length).toBe(1); - expect( (resolvedFQSNs[0] as SecretResult & { value: unknown })?.value, ).toContain(secretValue); + // we check that workspace .continue/.env does not override the /.env secret expect( (resolvedFQSNs[0] as SecretResult & { value: unknown })?.value, ).toContain(randomValueForContinueDirDotEnv);