@@ -174,14 +174,14 @@ func validateLoadImage(ctx context.Context, t *testing.T, profile string) {
174
174
busybox := "busybox:latest"
175
175
rr , err := Run (t , exec .CommandContext (ctx , "docker" , "pull" , busybox ))
176
176
if err != nil {
177
- t .Fatalf ("starting minikube : %v\n %s" , err , rr .Output ())
177
+ t .Fatalf ("failed to setup test (pull image) : %v\n %s" , err , rr .Output ())
178
178
}
179
179
180
180
// tag busybox
181
181
newImage := fmt .Sprintf ("busybox:%s" , profile )
182
182
rr , err = Run (t , exec .CommandContext (ctx , "docker" , "tag" , busybox , newImage ))
183
183
if err != nil {
184
- t .Fatalf ("starting minikube : %v\n %s" , err , rr .Output ())
184
+ t .Fatalf ("failed to setup test (tag image) : %v\n %s" , err , rr .Output ())
185
185
}
186
186
187
187
// try to load the new image into minikube
@@ -193,9 +193,14 @@ func validateLoadImage(ctx context.Context, t *testing.T, profile string) {
193
193
// make sure the image was correctly loaded
194
194
var cmd * exec.Cmd
195
195
if ContainerRuntime () == "docker" {
196
- cmd = exec .CommandContext (ctx , Target (), "ssh" , "-p" , profile , "--" , "docker" , "images" , "--format" , "{{.Repository}}:{{.Tag}}" )
196
+ cmd = exec .CommandContext (ctx , Target (), "ssh" , "-p" , profile , "--" , "docker" , "image" , "inspect" , newImage )
197
+ } else if ContainerRuntime () == "containerd" {
198
+ // crictl inspecti busybox:test-example
199
+ cmd = exec .CommandContext (ctx , Target (), "ssh" , "-p" , profile , "--" , "sudo" , "crictl" , "inspecti" , newImage )
197
200
} else {
198
- cmd = exec .CommandContext (ctx , Target (), "ssh" , "-p" , profile , "--" , "sudo" , "ctr" , "-n=k8s.io" , "image" , "ls" )
201
+ // crio adds localhost prefix
202
+ // crictl inspecti localhost/busybox:test-example
203
+ cmd = exec .CommandContext (ctx , Target (), "ssh" , "-p" , profile , "--" , "sudo" , "crictl" , "inspecti" , "localhost/" + newImage )
199
204
}
200
205
rr , err = Run (t , cmd )
201
206
if err != nil {
0 commit comments