Skip to content

Commit

Permalink
fix(core): pass env vars to e2es that are relevant for atomizer
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless committed Jul 16, 2024
1 parent 0eb2f2e commit 92aadf0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion e2e/jest/src/jest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ describe('Jest', () => {

await runCLIAsync(`e2e-ci ${libName}`, {
env: {
NX_SKIP_ATOMIZER_VALIDATION: 'true',
// e2e-ci will only run with DTE so we set this for local testing
NX_AGENT_NAME: process.env['NX_AGENT_NAME'] ?? 'fake-agent-00',
},
});
}, 90000);
Expand Down
3 changes: 2 additions & 1 deletion e2e/next/src/next.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ describe('Next.js Applications', () => {
const e2eResults = runCLI(`e2e-ci ${appName}-e2e --verbose`, {
verbose: true,
env: {
NX_SKIP_ATOMIZER_VALIDATION: 'true',
// e2e-ci will only run with DTE so we set this for local testing
NX_AGENT_NAME: process.env['NX_AGENT_NAME'] ?? 'fake-agent-00',
},
});
expect(e2eResults).toContain(
Expand Down
8 changes: 7 additions & 1 deletion e2e/utils/get-env-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ export function getStrippedEnvironmentVariables() {
return true;
}

const allowedKeys = ['NX_ADD_PLUGINS', 'NX_ISOLATE_PLUGINS'];
const allowedKeys = [
'NX_ADD_PLUGINS',
'NX_ISOLATE_PLUGINS',
'NX_CLOUD_DISTRIBUTED_EXECUTION_ID',
'NX_AGENT_NAME',
'NX_CACHE_DIRECTORY',
];

if (key.startsWith('NX_') && !allowedKeys.includes(key)) {
return false;
Expand Down

0 comments on commit 92aadf0

Please sign in to comment.