From 76cd0e49a1403e12a0b543c5eee554e68d88741d Mon Sep 17 00:00:00 2001 From: sayboras Date: Sun, 23 Feb 2020 15:16:01 +1100 Subject: [PATCH] Fix TestDownloadOnly for --vm-driver=none --- test/integration/aaa_download_only_test.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/integration/aaa_download_only_test.go b/test/integration/aaa_download_only_test.go index 4f0bc0914..1de5b8ef1 100644 --- a/test/integration/aaa_download_only_test.go +++ b/test/integration/aaa_download_only_test.go @@ -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) + } } } -- GitLab