提交 6eaf2fd9 编写于 作者: P Priya Wadhwa

fix cache reload to take container runtime into account

上级 1fe7615e
......@@ -617,7 +617,16 @@ func validateCacheCmd(ctx context.Context, t *testing.T, profile string) {
t.Run("cache_reload", func(t *testing.T) { // deleting image inside minikube node manually and expecting reload to bring it back
img := "k8s.gcr.io/pause:latest"
// deleting image inside minikube node manually
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "sudo", "docker", "rmi", img))
var binary string
switch ContainerRuntime() {
case "docker":
binary = "docker"
case "containerd", "crio":
binary = "crictl"
}
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", "sudo", binary, "rmi", img))
if err != nil {
t.Errorf("failed to manually delete image %q : %v", rr.Command(), err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册