mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
explicitly fail if no images are found when running remote tests
The previous implementation succeeds if no images are run. This causes silent failures when image matchers are provided that do not match any image.
This commit is contained in:
@@ -244,6 +244,10 @@ func main() {
|
||||
klog.Fatalf("Could not retrieve list of images based on image prefix %q and family %q: %v",
|
||||
imageConfig.ImageRegex, imageConfig.ImageFamily, err)
|
||||
}
|
||||
if len(images) == 0 { // if we have no images we can't run anything
|
||||
klog.Fatalf("No matching images retrieved on image prefix %q and family %q: %v",
|
||||
imageConfig.ImageRegex, imageConfig.ImageFamily, err)
|
||||
}
|
||||
} else {
|
||||
images = []string{imageConfig.Image}
|
||||
}
|
||||
|
Reference in New Issue
Block a user