Skip to content

Commit be37c35

Browse files
authored
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. <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 97fa7f1 commit be37c35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

e2e/storybook/src/storybook.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ describe('Storybook generators and executors for monorepos', () => {
120120
);
121121
runCLI(`run ${reactStorybookApp}:build-storybook --verbose`, {
122122
env: {
123-
NX_CLOUD_ENCRYPTION_KEY: 'MY SECRET',
124-
NX_CLOUD_ACCESS_TOKEN: 'MY SECRET',
123+
NX_SOME_SECRET: 'MY SECRET',
124+
NX_SOME_TOKEN: 'MY SECRET',
125125
},
126126
});
127127

@@ -131,8 +131,8 @@ describe('Storybook generators and executors for monorepos', () => {
131131
for (const file of files) {
132132
if (!file.endsWith('.js')) continue;
133133
const content = readFile(`${outDir}/${file}`);
134-
expect(content).not.toMatch(/NX_CLOUD_ENCRYPTION_KEY/);
135-
expect(content).not.toMatch(/NX_CLOUD_ACCESS_TOKEN/);
134+
expect(content).not.toMatch(/NX_SOME_SECRET/);
135+
expect(content).not.toMatch(/NX_SOME_TOKEN/);
136136
expect(content).not.toMatch(/MY SECRET/);
137137
}
138138
}, 300_000);

0 commit comments

Comments
 (0)