moby/integration-cli/docker_api_images_test.go
Antonio Murdaca 91bfed6049 Remove job from logs
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-13 08:25:31 +02:00

26 lines
542 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")
}