mirror of
https://github.com/docker/cli.git
synced 2026-01-16 20:22:36 +03:00
Always return the correct test image.
And not a *random* one from its history. Upstream-commit: fe014a8e6cfe4d2a338736e4c685bcf1b7685200 Component: engine
This commit is contained in:
@@ -135,10 +135,13 @@ func GetTestImage(runtime *Runtime) *Image {
|
||||
imgs, err := runtime.graph.All()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} else if len(imgs) < 1 {
|
||||
panic("GASP")
|
||||
}
|
||||
return imgs[0]
|
||||
for i := range imgs {
|
||||
if imgs[i].ID == unitTestImageId {
|
||||
return imgs[i]
|
||||
}
|
||||
}
|
||||
panic(fmt.Errorf("Test image %v not found", unitTestImageId))
|
||||
}
|
||||
|
||||
func TestRuntimeCreate(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user