File tree 2 files changed +2
-11
lines changed
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -445,11 +445,7 @@ func main() {
445
445
if runtime .Compiler == "gccgo" {
446
446
t .Skip ("skipping race test when built with gccgo" )
447
447
}
448
- dir , err := os .MkdirTemp ("" , "testrace" )
449
- if err != nil {
450
- t .Fatalf ("failed to create temp directory: %v" , err )
451
- }
452
- defer os .RemoveAll (dir )
448
+ dir := t .TempDir ()
453
449
goBinary := filepath .Join (runtime .GOROOT (), "bin" , "go" )
454
450
t .Logf ("%s version" , goBinary )
455
451
got , err := exec .Command (goBinary , "version" ).CombinedOutput ()
Original file line number Diff line number Diff line change @@ -517,12 +517,7 @@ func TestDir(t *testing.T) {
517
517
t .Skip ("see golang.org/issue/11453" )
518
518
}
519
519
520
- td , err := os .MkdirTemp ("" , "webdav-test" )
521
- if err != nil {
522
- t .Fatal (err )
523
- }
524
- defer os .RemoveAll (td )
525
- testFS (t , Dir (td ))
520
+ testFS (t , Dir (t .TempDir ()))
526
521
}
527
522
528
523
func TestMemFS (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments