1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli/docker_api_images_test.go
Doug Davis d045b9776b Remove Job from docker images
Also removes engine.Table

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-08 19:33:01 -07:00

26 lines
539 B
Go

package main
import (
"encoding/json"
"testing"
"github.com/docker/docker/api/types"
)
func TestLegacyImages(t *testing.T) {
body, err := sockRequest("GET", "/v1.6/images/json", nil)
if err != nil {
t.Fatalf("Error on GET: %s", err)
}
images := []types.LegacyImage{}
if err = json.Unmarshal(body, &images); err != nil {
t.Fatalf("Error on unmarshal: %s", err)
}
if len(images) == 0 || images[0].Tag == "" || images[0].Repository == "" {
t.Fatalf("Bad data: %q", images)
}
logDone("images - checking legacy json")
}