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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user