mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Merge pull request #3829 from vieux/fix_api_regression
Fix ID -> Id api
This commit is contained in:
@@ -204,7 +204,7 @@ func TestGetImagesJSON(t *testing.T) {
|
||||
}
|
||||
assertHttpNotError(r2, t)
|
||||
|
||||
images2 := engine.NewTable("ID", 0)
|
||||
images2 := engine.NewTable("Id", 0)
|
||||
if _, err := images2.ReadListFrom(r2.Body.Bytes()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -215,7 +215,7 @@ func TestGetImagesJSON(t *testing.T) {
|
||||
|
||||
found = false
|
||||
for _, img := range images2.Data {
|
||||
if img.Get("ID") == unitTestImageID {
|
||||
if img.Get("Id") == unitTestImageID {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@@ -237,7 +237,7 @@ func TestGetImagesJSON(t *testing.T) {
|
||||
}
|
||||
assertHttpNotError(r3, t)
|
||||
|
||||
images3 := engine.NewTable("ID", 0)
|
||||
images3 := engine.NewTable("Id", 0)
|
||||
if _, err := images3.ReadListFrom(r3.Body.Bytes()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -339,7 +339,7 @@ func TestGetContainersJSON(t *testing.T) {
|
||||
if len(containers.Data) != beginLen+1 {
|
||||
t.Fatalf("Expected %d container, %d found (started with: %d)", beginLen+1, len(containers.Data), beginLen)
|
||||
}
|
||||
if id := containers.Data[0].Get("ID"); id != containerID {
|
||||
if id := containers.Data[0].Get("Id"); id != containerID {
|
||||
t.Fatalf("Container ID mismatch. Expected: %s, received: %s\n", containerID, id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +60,8 @@ func cleanup(eng *engine.Engine, t *testing.T) error {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, image := range images.Data {
|
||||
if image.Get("ID") != unitTestImageID {
|
||||
mkServerFromEngine(eng, t).DeleteImage(image.Get("ID"), false)
|
||||
if image.Get("Id") != unitTestImageID {
|
||||
mkServerFromEngine(eng, t).DeleteImage(image.Get("Id"), false)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -288,7 +288,7 @@ func TestRestartKillWait(t *testing.T) {
|
||||
}
|
||||
|
||||
setTimeout(t, "Waiting on stopped container timedout", 5*time.Second, func() {
|
||||
job = srv.Eng.Job("wait", outs.Data[0].Get("ID"))
|
||||
job = srv.Eng.Job("wait", outs.Data[0].Get("Id"))
|
||||
var statusStr string
|
||||
job.Stdout.AddString(&statusStr)
|
||||
if err := job.Run(); err != nil {
|
||||
@@ -472,7 +472,7 @@ func TestRmi(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, image := range images.Data {
|
||||
if strings.Contains(unitTestImageID, image.Get("ID")) {
|
||||
if strings.Contains(unitTestImageID, image.Get("Id")) {
|
||||
continue
|
||||
}
|
||||
if image.GetList("RepoTags")[0] == "<none>:<none>" {
|
||||
@@ -650,7 +650,7 @@ func assertContainerList(srv *docker.Server, all bool, limit int, since, before
|
||||
return false
|
||||
}
|
||||
for i := 0; i < len(outs.Data); i++ {
|
||||
if outs.Data[i].Get("ID") != expected[i] {
|
||||
if outs.Data[i].Get("Id") != expected[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user