From 8518aac3147da163ac5accfacbf0c30f684177e2 Mon Sep 17 00:00:00 2001 From: ian woolf Date: Thu, 8 Apr 2021 20:42:47 +0800 Subject: [PATCH] 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 Reviewed-by: Emmanuel Odeke --- src/crypto/x509/root_unix_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/crypto/x509/root_unix_test.go b/src/crypto/x509/root_unix_test.go index 38038a65f3..7118f12d74 100644 --- a/src/crypto/x509/root_unix_test.go +++ b/src/crypto/x509/root_unix_test.go @@ -147,11 +147,7 @@ func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) { os.Setenv(certFileEnv, origFile) }() - tmpDir, err := os.MkdirTemp(os.TempDir(), "x509-issue35325") - if err != nil { - t.Fatalf("Failed to create temporary directory: %v", err) - } - defer os.RemoveAll(tmpDir) + tmpDir := t.TempDir() rootPEMs := []string{ geoTrustRoot, -- 2.50.0