Skip to content

Commit afdd211

Browse files
clydinmgechev
authored andcommitted
test: control E2E environment logging
1 parent 515e67e commit afdd211

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/legacy-cli/e2e/setup/300-log-environment.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ export default async function() {
44
console.log('Environment:');
55

66
Object.keys(process.env).forEach(envName => {
7+
// CI Logs should not contain environment variables that are considered secret
8+
const lowerName = envName.toLowerCase();
9+
if (lowerName.includes('key') || lowerName.includes('secret')) {
10+
return;
11+
}
12+
713
console.log(` ${envName}: ${process.env[envName].replace(/[\n\r]+/g, '\n ')}`);
814
});
915

0 commit comments

Comments
 (0)