Create missing intermediate directories in test

This commit is contained in:
Matt Joiner 2016-09-21 21:17:22 +10:00
parent 3b5f123645
commit c593366aab
1 changed files with 1 additions and 0 deletions

View File

@ -1026,6 +1026,7 @@ func TestSetMaxEstablishedConn(t *testing.T) {
} }
func makeMagnet(t *testing.T, cl *Client, dir string, name string) string { func makeMagnet(t *testing.T, cl *Client, dir string, name string) string {
os.MkdirAll(dir, 0770)
file, err := os.Create(filepath.Join(dir, name)) file, err := os.Create(filepath.Join(dir, name))
require.NoError(t, err) require.NoError(t, err)
file.Write([]byte(name)) file.Write([]byte(name))