mirror of
https://github.com/golang/go
synced 2024-11-18 08:54:45 -07:00
net: align temporary file, directory names in tests
Also adds missing temporary file deletion. Change-Id: Ia644b0898022e05d2f5232af38f51d55e40c6fb5 Reviewed-on: https://go-review.googlesource.com/9772 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
aebd123e8c
commit
76d67eaccc
@ -101,7 +101,7 @@ type resolvConfTest struct {
|
||||
}
|
||||
|
||||
func newResolvConfTest(t *testing.T) *resolvConfTest {
|
||||
dir, err := ioutil.TempDir("", "resolvConfTest")
|
||||
dir, err := ioutil.TempDir("", "go-resolvconftest")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -524,10 +524,11 @@ func TestFileError(t *testing.T) {
|
||||
t.Skip("not supported on %s", runtime.GOOS)
|
||||
}
|
||||
|
||||
f, err := ioutil.TempFile("", "nettest")
|
||||
f, err := ioutil.TempFile("", "go-nettest")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(f.Name())
|
||||
defer f.Close()
|
||||
|
||||
c, err := FileConn(f)
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
// It also uses /tmp directory in case it is prohibited to create UNIX
|
||||
// sockets in TMPDIR.
|
||||
func testUnixAddr() string {
|
||||
f, err := ioutil.TempFile("", "nettest")
|
||||
f, err := ioutil.TempFile("", "go-nettest")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user