mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
update auth_test.go
This commit is contained in:
parent
5bc344ab73
commit
7bade49d4c
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ func TestLogin(t *testing.T) {
|
||||||
os.Setenv("DOCKER_INDEX_URL", "https://indexstaging-docker.dotcloud.com")
|
os.Setenv("DOCKER_INDEX_URL", "https://indexstaging-docker.dotcloud.com")
|
||||||
defer os.Setenv("DOCKER_INDEX_URL", "")
|
defer os.Setenv("DOCKER_INDEX_URL", "")
|
||||||
authConfig := &AuthConfig{Username: "unittester", Password: "surlautrerivejetattendrai", Email: "noise+unittester@dotcloud.com"}
|
authConfig := &AuthConfig{Username: "unittester", Password: "surlautrerivejetattendrai", Email: "noise+unittester@dotcloud.com"}
|
||||||
status, err := Login(authConfig)
|
status, err := Login(authConfig, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ func TestCreateAccount(t *testing.T) {
|
||||||
token := hex.EncodeToString(tokenBuffer)[:12]
|
token := hex.EncodeToString(tokenBuffer)[:12]
|
||||||
username := "ut" + token
|
username := "ut" + token
|
||||||
authConfig := &AuthConfig{Username: username, Password: "test42", Email: "docker-ut+" + token + "@example.com"}
|
authConfig := &AuthConfig{Username: username, Password: "test42", Email: "docker-ut+" + token + "@example.com"}
|
||||||
status, err := Login(authConfig)
|
status, err := Login(authConfig, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ func TestCreateAccount(t *testing.T) {
|
||||||
t.Fatalf("Expected status: \"%s\", found \"%s\" instead.", expectedStatus, status)
|
t.Fatalf("Expected status: \"%s\", found \"%s\" instead.", expectedStatus, status)
|
||||||
}
|
}
|
||||||
|
|
||||||
status, err = Login(authConfig)
|
status, err = Login(authConfig, nil)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("Expected error but found nil instead")
|
t.Fatalf("Expected error but found nil instead")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue