Skip to content

Commit

Permalink
fixing UT r2
Browse files Browse the repository at this point in the history
  • Loading branch information
zoxpx committed Apr 15, 2024
1 parent 527629b commit 7c3f770
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vault/vault_cooldowns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ var (
)

func setupK8sTests(t *testing.T) {
if _, err := os.Stat("/var/run/secrets/kubernetes.io/serviceaccount/token"); os.IsNotExist(err) {
tokFile := "/var/run/secrets/kubernetes.io/serviceaccount/token"

tokFile := "/var/run/secrets/kubernetes.io/serviceaccount/token"
if _, err := os.Stat(tokFile); os.IsNotExist(err) {
t.Logf("Creating dummy token file: %s", tokFile)

err := os.MkdirAll(path.Dir(tokFile), 0755)
require.NoError(t, err)
_, err = os.OpenFile(tokFile, os.O_RDONLY|os.O_CREATE, 0666) // "touch" the file
Expand Down

0 comments on commit 7c3f770

Please sign in to comment.