Commit ba53524
authored
fix: use temp directory in creds tests to prevent auth.json pollution (knative#3311)
* fix: use temp directory in creds tests to prevent auth.json pollution
Fixes knative#3158
When HOME is empty during tests, testConfigPath now falls back to
t.TempDir() instead of returning an empty string. This prevents
auth.json from being created in the pkg/creds/ directory.
* chore: trigger CI re-run
* chore: remove auth.json from .gitignore
Since the test now uses a temp directory, auth.json is no longer
created in pkg/creds/, so we don't need to ignore it anymore.1 parent cf46238 commit ba53524
2 files changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1033 | 1034 | | |
1034 | 1035 | | |
1035 | 1036 | | |
| |||
1039 | 1040 | | |
1040 | 1041 | | |
1041 | 1042 | | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1042 | 1046 | | |
1043 | 1047 | | |
1044 | 1048 | | |
| |||
0 commit comments