Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions openshift-hack/cmd/k8s-tests-ext/k8s-tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"reflect"
"strconv"
"strings"

et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"

Expand Down Expand Up @@ -88,7 +89,19 @@ func main() {
Qualifiers: []string{withExcludedTestsFilter(`name.contains('[Serial]')`)},
})

// ignoredImagePrefixes we don't want to mirror, i.e. things that are intentionally invalid.
ignoredImagePrefixes := []string{
"invalid.registry.k8s.io/invalid",
}

imageLoop:
for k, v := range image.GetOriginalImageConfigs() {
for _, i := range ignoredImagePrefixes {
if strings.HasPrefix(v.GetE2EImage(), i) {
continue imageLoop
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure we should do this here. In my mind, the images command isn't to be used exclusively for image mirroring. The invalid image is in fact used by tests, it just doesn't exist.

I feel like we should stick to the output of GetE2EImage() and filter this out somewhere else. I don't have strong feeling, though.

image := convertToImage(v)
image.Index = int(k)
kubeTestsExtension.RegisterImage(image)
Expand Down