From be37c3535140e14b1cea5c81b48448db3b7d954b Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Wed, 28 Aug 2024 11:24:06 -0400 Subject: [PATCH] chore(storybook): rename env vars so we do not cause Nx Cloud connection errors (#27680) The test to ensure we don't bundle secrets/tokens is causing an error like this: ``` NX Connection to Nx Cloud failed with status code ERR_BAD_REQUEST ``` e.g. https://staging.nx.app/runs/0IjxPh53dK Likely due to validation errors now in place. We shouldn't be hitting Nx Cloud from the test project, so I've renamed the variables to be something that isn't used to connect to Cloud. ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes # --- e2e/storybook/src/storybook.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/storybook/src/storybook.test.ts b/e2e/storybook/src/storybook.test.ts index 5aa70f8aa3..4c22b6ee7f 100644 --- a/e2e/storybook/src/storybook.test.ts +++ b/e2e/storybook/src/storybook.test.ts @@ -120,8 +120,8 @@ describe('Storybook generators and executors for monorepos', () => { ); runCLI(`run ${reactStorybookApp}:build-storybook --verbose`, { env: { - NX_CLOUD_ENCRYPTION_KEY: 'MY SECRET', - NX_CLOUD_ACCESS_TOKEN: 'MY SECRET', + NX_SOME_SECRET: 'MY SECRET', + NX_SOME_TOKEN: 'MY SECRET', }, }); @@ -131,8 +131,8 @@ describe('Storybook generators and executors for monorepos', () => { for (const file of files) { if (!file.endsWith('.js')) continue; const content = readFile(`${outDir}/${file}`); - expect(content).not.toMatch(/NX_CLOUD_ENCRYPTION_KEY/); - expect(content).not.toMatch(/NX_CLOUD_ACCESS_TOKEN/); + expect(content).not.toMatch(/NX_SOME_SECRET/); + expect(content).not.toMatch(/NX_SOME_TOKEN/); expect(content).not.toMatch(/MY SECRET/); } }, 300_000);