Fix TestPreload on containerd
parent
db3bfc3f9e
commit
74161d674b
|
@ -49,9 +49,15 @@ func TestPreload(t *testing.T) {
|
|||
t.Fatalf("%s failed: %v", rr.Command(), err)
|
||||
}
|
||||
|
||||
// Now, pull the busybox image into the VMs docker daemon
|
||||
// Now, pull the busybox image into minikube
|
||||
image := "busybox"
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "pull", image))
|
||||
var cmd *exec.Cmd
|
||||
if ContainerRuntime() == "docker" {
|
||||
cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "pull", image)
|
||||
} else {
|
||||
cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "sudo", "crictl", "pull", image)
|
||||
}
|
||||
rr, err = Run(t, cmd)
|
||||
if err != nil {
|
||||
t.Fatalf("%s failed: %v", rr.Command(), err)
|
||||
}
|
||||
|
@ -65,7 +71,12 @@ func TestPreload(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("%s failed: %v", rr.Command(), err)
|
||||
}
|
||||
rr, err = Run(t, exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "images"))
|
||||
if ContainerRuntime() == "docker" {
|
||||
cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "docker", "images")
|
||||
} else {
|
||||
cmd = exec.CommandContext(ctx, Target(), "ssh", "-p", profile, "--", "sudo", "crictl", "image", "ls")
|
||||
}
|
||||
rr, err = Run(t, cmd)
|
||||
if err != nil {
|
||||
t.Fatalf("%s failed: %v", rr.Command(), err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue