Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1895537: Image extract tests should check results of ImageStreamImport #25678

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion test/extended/images/extract.go
Expand Up @@ -2,6 +2,7 @@ package images

import (
"context"
"fmt"
"strings"

"github.com/MakeNowJust/heredoc"
Expand Down Expand Up @@ -40,7 +41,7 @@ var _ = g.Describe("[sig-imageregistry][Feature:ImageExtract] Image extract", fu
cli := oc.KubeFramework().PodClient()
client := imageclientset.NewForConfigOrDie(oc.UserConfig()).ImageV1()

_, err = client.ImageStreamImports(ns).Create(context.Background(), &imageapi.ImageStreamImport{
isi, err := client.ImageStreamImports(ns).Create(context.Background(), &imageapi.ImageStreamImport{
ObjectMeta: metav1.ObjectMeta{
Name: "1",
},
Expand All @@ -60,6 +61,10 @@ var _ = g.Describe("[sig-imageregistry][Feature:ImageExtract] Image extract", fu
}, metav1.CreateOptions{})
o.Expect(err).ToNot(o.HaveOccurred())

for i, img := range isi.Status.Images {
o.Expect(img.Status.Status).To(o.Equal("Success"), fmt.Sprintf("imagestreamimport status for spec.image[%d] (message: %s)", i, img.Status.Message))
}

// busyboxLayers := isi.Status.Images[0].Image.DockerImageLayers
// busyboxLen := len(busyboxLayers)
// mysqlLayers := isi.Status.Images[1].Image.DockerImageLayers
Expand Down