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

Fix TestDownloadOnly for --vm-driver=none

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