1
0
mirror of https://github.com/moby/moby.git synced 2026-01-06 07:21:23 +03:00

fix tests & small code improvment

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux
2014-01-14 11:43:58 -08:00
parent bea6dd3888
commit 7898dca8b3
3 changed files with 7 additions and 15 deletions

View File

@@ -263,12 +263,12 @@ func TestGetImagesHistory(t *testing.T) {
}
assertHttpNotError(r, t)
history := []docker.APIHistory{}
if err := json.Unmarshal(r.Body.Bytes(), &history); err != nil {
outs := engine.NewTable("Created", 0)
if _, err := outs.ReadFrom(r.Body); err != nil {
t.Fatal(err)
}
if len(history) != 1 {
t.Errorf("Expected 1 line, %d found", len(history))
if len(outs.Data) != 1 {
t.Errorf("Expected 1 line, %d found", len(outs.Data))
}
}