From 7c3f770301955fdf1731a652b6eac17acd4f1af1 Mon Sep 17 00:00:00 2001 From: Zoran Rajic Date: Mon, 15 Apr 2024 10:35:52 -0700 Subject: [PATCH] fixing UT r2 --- vault/vault_cooldowns_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vault/vault_cooldowns_test.go b/vault/vault_cooldowns_test.go index 449253b1..f4132a51 100644 --- a/vault/vault_cooldowns_test.go +++ b/vault/vault_cooldowns_test.go @@ -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