Skip to content

Commit

Permalink
Merge pull request #2294 from cjihrig/test-fixup
Browse files Browse the repository at this point in the history
test: handle process.env in config_test.ts
  • Loading branch information
k8s-ci-robot authored Mar 5, 2025
2 parents e27eb26 + fa91a37 commit 547ef69
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,19 @@ describe('KubeConfig', () => {
});

describe('BufferOrFile', () => {
let originalEnv;

before(() => {
// The code being tested here references process.env and can fail
// if run on a machine with certain environment variable settings.
originalEnv = process.env;
process.env = {};
});

after(() => {
process.env = originalEnv;
});

it('should load from root if present', () => {
const data = 'some data for file';
const arg: any = {
Expand Down

0 comments on commit 547ef69

Please sign in to comment.