提交 76cd0e49 编写于 作者: S sayboras

Fix TestDownloadOnly for --vm-driver=none

上级 c7f39fc1
......@@ -72,12 +72,15 @@ func TestDownloadOnly(t *testing.T) {
t.Errorf("kubeadm images: %v %+v", v, err)
}
for _, img := range imgs {
img = strings.Replace(img, ":", "_", 1) // for example kube-scheduler:v1.15.2 --> kube-scheduler_v1.15.2
fp := filepath.Join(localpath.MiniPath(), "cache", "images", img)
_, err := os.Stat(fp)
if err != nil {
t.Errorf("expected image file exist at %q but got error: %v", fp, err)
// skip verify for cache images if --vm-driver=none
if !strings.Contains(strings.Join(StartArgs(), " "), "--vm-driver=none") {
for _, img := range imgs {
img = strings.Replace(img, ":", "_", 1) // for example kube-scheduler:v1.15.2 --> kube-scheduler_v1.15.2
fp := filepath.Join(localpath.MiniPath(), "cache", "images", img)
_, err := os.Stat(fp)
if err != nil {
t.Errorf("expected image file exist at %q but got error: %v", fp, err)
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册