mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Hack: fix tests which didn't cleanup properly
This commit is contained in:
parent
240d5b3fa1
commit
5c175357aa
2 changed files with 5 additions and 2 deletions
|
@ -76,7 +76,7 @@ func TestCreateAccount(t *testing.T) {
|
|||
}
|
||||
|
||||
func setupTempConfigFile() (*ConfigFile, error) {
|
||||
root, err := ioutil.TempDir("", "docker-test")
|
||||
root, err := ioutil.TempDir("", "docker-test-auth")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ func TestSameAuthDataPostSave(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(configFile.rootPath)
|
||||
|
||||
err = SaveConfig(configFile)
|
||||
if err != nil {
|
||||
|
@ -127,6 +128,7 @@ func TestResolveAuthConfigIndexServer(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(configFile.rootPath)
|
||||
|
||||
for _, registry := range []string{"", IndexServerAddress()} {
|
||||
resolved := configFile.ResolveAuthConfig(registry)
|
||||
|
@ -141,6 +143,7 @@ func TestResolveAuthConfigFullURL(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(configFile.rootPath)
|
||||
|
||||
registryAuth := AuthConfig{
|
||||
Username: "foo-user",
|
||||
|
|
|
@ -1189,7 +1189,7 @@ func BenchmarkRunParallel(b *testing.B) {
|
|||
}
|
||||
|
||||
func tempDir(t *testing.T) string {
|
||||
tmpDir, err := ioutil.TempDir("", "docker-test")
|
||||
tmpDir, err := ioutil.TempDir("", "docker-test-container")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue