未验证 提交 9f851f78 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #7136 from tstromberg/crio-mismatch

Fix TestStartStop/group/crio: images mismatch
......@@ -260,12 +260,14 @@ func testPulledImages(ctx context.Context, t *testing.T, profile string, version
if err != nil {
t.Errorf("images unmarshal: %v", err)
}
gotImages := []string{}
found := map[string]bool{}
for _, img := range jv["images"] {
for _, i := range img.Tags {
// Remove container-specific prefixes for naming consistency
i = strings.TrimPrefix(i, "docker.io/")
i = strings.TrimPrefix(i, "localhost/")
if defaultImage(i) {
// Remove docker.io for naming consistency between container runtimes
gotImages = append(gotImages, strings.TrimPrefix(i, "docker.io/"))
found[i] = true
} else {
t.Logf("Found non-minikube image: %s", i)
}
......@@ -275,6 +277,10 @@ func testPulledImages(ctx context.Context, t *testing.T, profile string, version
if err != nil {
t.Errorf("kubeadm images: %v", version)
}
gotImages := []string{}
for k := range found {
gotImages = append(gotImages, k)
}
sort.Strings(want)
sort.Strings(gotImages)
if diff := cmp.Diff(want, gotImages); diff != "" {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册