Generate ImageHistory from swagger spec.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2016-11-09 16:32:53 -05:00
parent b83d9bf6a9
commit b462c93edb
10 changed files with 66 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ import (
"strings"
"testing"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
"golang.org/x/net/context"
)
@@ -30,7 +30,7 @@ func TestImageHistory(t *testing.T) {
if !strings.HasPrefix(r.URL.Path, expectedURL) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, r.URL)
}
b, err := json.Marshal([]types.ImageHistory{
b, err := json.Marshal([]image.HistoryResponseItem{
{
ID: "image_id1",
Tags: []string{"tag1", "tag2"},