diff --git a/pkg/peertls/peertls_test.go b/pkg/peertls/peertls_test.go index 41fb6be52..d9d5944e6 100644 --- a/pkg/peertls/peertls_test.go +++ b/pkg/peertls/peertls_test.go @@ -361,7 +361,7 @@ func TestNewRevocationExt(t *testing.T) { } func TestRevocationDB_Get(t *testing.T) { - tmp, err := ioutil.TempDir("", os.TempDir()) + tmp, err := ioutil.TempDir("", "TestRevocationDB_Get") defer func() { _ = os.RemoveAll(tmp) }() keys, chain, err := newCertChain(2) @@ -407,7 +407,7 @@ func TestRevocationDB_Get(t *testing.T) { } func TestRevocationDB_Put(t *testing.T) { - tmp, err := ioutil.TempDir("", os.TempDir()) + tmp, err := ioutil.TempDir("", "TestRevocationDB_Put") defer func() { _ = os.RemoveAll(tmp) }() keys, chain, err := newCertChain(2) @@ -560,7 +560,7 @@ func TestParseExtensions(t *testing.T) { _, unrelatedChain, err := newCertChain(1) assert.NoError(t, err) - tmp, err := ioutil.TempDir("", os.TempDir()) + tmp, err := ioutil.TempDir("", "TestParseExtensions") if err != nil { t.FailNow() } diff --git a/pkg/provider/identity_test.go b/pkg/provider/identity_test.go index 4d4a8bcc6..04335ef0d 100644 --- a/pkg/provider/identity_test.go +++ b/pkg/provider/identity_test.go @@ -184,7 +184,7 @@ func TestNewServerOptions(t *testing.T) { done, _, fi, _ := tempIdentity(t) defer done() - tmp, err := ioutil.TempDir(os.TempDir(), "") + tmp, err := ioutil.TempDir("", "TestNewServerOptions") if !assert.NoError(t, err) { t.FailNow() }