Commit b23dcbf
committed
pkg/config: fix verify getDefaultEnv test flake
Do not use Default() in unit tests, that caches the config in a global
var so it conflicts with other tests also calling it.
Now only the Reload test should test that. The Default() call got broken
by commit ee04b4f because now the test only unsets the env after the
last Reload() call which should already use the actual default.
Fixes: ee04b4f ("*_test.go: use t.TempDir, t.Setenv")
Signed-off-by: Paul Holzinger <pholzing@redhat.com>1 parent e6e162a commit b23dcbf
2 files changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
751 | 758 | | |
| 759 | + | |
752 | 760 | | |
753 | 761 | | |
754 | 762 | | |
| |||
768 | 776 | | |
769 | 777 | | |
770 | 778 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | 779 | | |
775 | 780 | | |
776 | 781 | | |
| |||
0 commit comments