From 75ac6b0b5819b225b8d6816e6a20c6e9fe0e1485 Mon Sep 17 00:00:00 2001 From: ardevd Date: Mon, 15 Jan 2024 18:03:31 +0100 Subject: [PATCH] use t.TempDir --- basic_client_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/basic_client_test.go b/basic_client_test.go index 6c805f3..73c44af 100644 --- a/basic_client_test.go +++ b/basic_client_test.go @@ -45,9 +45,7 @@ XhkpT5dliEGFLNe6OOgeWTU1JpEXfCud/GImtNMHQi4EDWQfvWuCNGhOoQ== // Now let's write the data to a file to make sure parseTLSAndMacaroon // parses that properly as well. - tempDirPath, err := os.MkdirTemp("", ".testCreds") - require.NoError(t, err) - defer os.RemoveAll(tempDirPath) + tempDirPath := t.TempDir() certPath := tempDirPath + "/tls.cert" tlsPEMBytes := []byte(tlsData)