mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
d045b9776b
Also removes engine.Table Signed-off-by: Doug Davis <dug@us.ibm.com>
26 lines
539 B
Go
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")
|
|
}
|