Skip to content

Commit 58924c2

Browse files
committed
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.
1 parent a79c711 commit 58924c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/e2e_node/runner/remote/run_remote.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ func main() {
244244
klog.Fatalf("Could not retrieve list of images based on image prefix %q and family %q: %v",
245245
imageConfig.ImageRegex, imageConfig.ImageFamily, err)
246246
}
247+
if len(images) == 0 { // if we have no images we can't run anything
248+
klog.Fatalf("No matching images retrieved on image prefix %q and family %q: %v",
249+
imageConfig.ImageRegex, imageConfig.ImageFamily, err)
250+
}
247251
} else {
248252
images = []string{imageConfig.Image}
249253
}

0 commit comments

Comments
 (0)