Skip to content

fix(test): Make resetEnv() properly reset settings - #7391

Merged
marckhouzam merged 1 commit into
helm:masterfrom
VilledeMontreal:fix/resetEnv
Jan 14, 2020
Merged

marckhouzam merged 1 commit into
helm:masterfrom
VilledeMontreal:fix/resetEnv

Conversation

@marckhouzam

Copy link
Copy Markdown
Member

I got test failures in #7323 when I started using the --debug flag in one of my tests commands.

It turns out that because the 'settings' variable is a pointer, it cannot be used to store the original envSettings and then restore them.

Instead, this commit creates an entirely new envSettings, after having set the environment variables, which may affect it.

Signed-off-by: Marc Khouzam [email protected]

Because the 'settings' variable is a pointer, it cannot be used to store
the original envSettings and then restore them.

Instead, this commit creates an entirely new envSettings, after having
set the environment variables, which may affect it.

Signed-off-by: Marc Khouzam <[email protected]>
@helm-bot helm-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 13, 2020
@mattfarina
mattfarina self-requested a review January 14, 2020 16:46
@mattfarina mattfarina added the v3.x Issues and Pull Requests related to the major version v3 label Jan 14, 2020
@marckhouzam
marckhouzam merged commit 2dcfbea into helm:master Jan 14, 2020
@marckhouzam
marckhouzam deleted the fix/resetEnv branch January 14, 2020 17:10
@marckhouzam

Copy link
Copy Markdown
Member Author

Thanks @mattfarina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. v3.x Issues and Pull Requests related to the major version v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants