]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: replace os.MkdirTemp with T.TempDir
authorian woolf <btw515wolf2@gmail.com>
Thu, 8 Apr 2021 12:42:47 +0000 (20:42 +0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 9 Apr 2021 04:03:50 +0000 (04:03 +0000)
Updates #45402

Change-Id: Ifb1fa5232a0fa1be62e886643cec9deaa3b312ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/308409
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/crypto/x509/root_unix_test.go

index 38038a65f3ed92e3cbc11b7493d6736fd88a12d1..7118f12d744cdf5e4a8515d47496652eb3297f6a 100644 (file)
@@ -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,