diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 3a335aedbfd811b0a9b1d2a597b02f73e72d806d..bba2686bef406d45e87e3af909b71be5e24e8bff 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -174,14 +174,14 @@ func validateLoadImage(ctx context.Context, t *testing.T, profile string) { busybox := "busybox:latest" rr, err := Run(t, exec.CommandContext(ctx, "docker", "pull", busybox)) if err != nil { - t.Fatalf("starting minikube: %v\n%s", err, rr.Output()) + t.Fatalf("failed to setup test (pull image): %v\n%s", err, rr.Output()) } // tag busybox newImage := fmt.Sprintf("busybox:%s", profile) rr, err = Run(t, exec.CommandContext(ctx, "docker", "tag", busybox, newImage)) if err != nil { - t.Fatalf("starting minikube: %v\n%s", err, rr.Output()) + t.Fatalf("failed to setup test (tag image) : %v\n%s", err, rr.Output()) } // try to load the new image into minikube @@ -193,9 +193,14 @@ func validateLoadImage(ctx context.Context, t *testing.T, profile string) { // make sure the image was correctly loaded var cmd *exec.Cmd if ContainerRuntime() == "docker" { - cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "images", "--format", "{{.Repository}}:{{.Tag}}") + cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "image", "inspect", newImage) + } else if ContainerRuntime() == "containerd" { + // crictl inspecti busybox:test-example + cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "sudo", "crictl", "inspecti", newImage) } else { - cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "sudo", "ctr", "-n=k8s.io", "image", "ls") + // crio adds localhost prefix + // crictl inspecti localhost/busybox:test-example + cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "sudo", "crictl", "inspecti", "localhost/"+newImage) } rr, err = Run(t, cmd) if err != nil {