Skip to content

Commit 8518aac

Browse files
ianwoolfianlancetaylor
authored andcommitted
crypto/x509: replace os.MkdirTemp with T.TempDir
Updates #45402 Change-Id: Ifb1fa5232a0fa1be62e886643cec9deaa3b312ad Reviewed-on: https://go-review.googlesource.com/c/go/+/308409 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]>
1 parent d25c4fb commit 8518aac

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/crypto/x509/root_unix_test.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,7 @@ func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) {
147147
os.Setenv(certFileEnv, origFile)
148148
}()
149149

150-
tmpDir, err := os.MkdirTemp(os.TempDir(), "x509-issue35325")
151-
if err != nil {
152-
t.Fatalf("Failed to create temporary directory: %v", err)
153-
}
154-
defer os.RemoveAll(tmpDir)
150+
tmpDir := t.TempDir()
155151

156152
rootPEMs := []string{
157153
geoTrustRoot,

0 commit comments

Comments
 (0)