This commit is contained in:
Guillaume J. Charmes 2013-05-09 21:53:28 -07:00
Родитель eeaea4e873
Коммит 483c942520
2 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -142,7 +142,7 @@ func TestGetImagesJson(t *testing.T) {
func TestGetImagesViz(t *testing.T) {
//FIXME: Implement this test (or remove this endpoint)
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestGetImagesSearch(t *testing.T) {
@ -267,7 +267,7 @@ func TestGetContainersPs(t *testing.T) {
func TestGetContainersExport(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestGetContainerChanges(t *testing.T) {
@ -289,9 +289,9 @@ func TestGetContainerChanges(t *testing.T) {
// t.Fatalf("Body expected, received: nil\n")
// }
// if r.Code != http.StatusOK {
// t.Fatalf("%d OK expected, received %d\n", http.StatusNoContent, r.Code)
// }
func TestGetContainersByName(t *testing.T) {
//FIXME: Implement this test
t.Log("Test not implemented")
}
func TestPostAuth(t *testing.T) {
@ -327,32 +327,32 @@ func TestPostAuth(t *testing.T) {
func TestPostCommit(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostBuild(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostImagesCreate(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostImagesInsert(t *testing.T) {
//FIXME: Implement this test (or remove this endpoint)
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostImagesPush(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostImagesTag(t *testing.T) {
//FIXME: Implement this test
t.Log("Test on implemented")
t.Log("Test not implemented")
}
func TestPostContainersCreate(t *testing.T) {
@ -651,7 +651,7 @@ func TestPostContainersWait(t *testing.T) {
}
setTimeout(t, "Wait timed out", 3*time.Second, func() {
body, err := postContainersWait(srv, nil, nil, nil)
body, err := postContainersWait(srv, nil, nil, map[string]string{"name": container.Id})
if err != nil {
t.Fatal(err)
}

Просмотреть файл

@ -844,13 +844,13 @@ func CmdCommit(args ...string) error {
return err
}
var out ApiId
err = json.Unmarshal(body, &out)
apiId := &ApiId{}
err = json.Unmarshal(body, apiId)
if err != nil {
return err
}
fmt.Println(out.Id)
fmt.Println(apiId.Id)
return nil
}
@ -886,7 +886,7 @@ func CmdDiff(args ...string) error {
return err
}
var changes []Change
changes := []Change{}
err = json.Unmarshal(body, &changes)
if err != nil {
return err
@ -933,8 +933,8 @@ func CmdAttach(args ...string) error {
return err
}
var container Container
err = json.Unmarshal(body, &container)
container := &Container{}
err = json.Unmarshal(body, container)
if err != nil {
return err
}
@ -968,7 +968,7 @@ func CmdSearch(args ...string) error {
return err
}
var outs []ApiSearch
outs := []ApiSearch{}
err = json.Unmarshal(body, &outs)
if err != nil {
return err
@ -1100,8 +1100,8 @@ func CmdRun(args ...string) error {
return err
}
var out ApiRun
err = json.Unmarshal(body, &out)
out := &ApiRun{}
err = json.Unmarshal(body, out)
if err != nil {
return err
}