diff --git a/junit5/src/main/java/cz/xtf/junit5/extensions/SkipForCondition.java b/junit5/src/main/java/cz/xtf/junit5/extensions/SkipForCondition.java index a1787211..ab36f3ec 100644 --- a/junit5/src/main/java/cz/xtf/junit5/extensions/SkipForCondition.java +++ b/junit5/src/main/java/cz/xtf/junit5/extensions/SkipForCondition.java @@ -13,6 +13,7 @@ import cz.xtf.core.config.OpenShiftConfig; import cz.xtf.core.config.XTFConfig; import cz.xtf.core.image.Image; +import cz.xtf.core.image.UnknownImageException; import cz.xtf.core.openshift.OpenShifts; import cz.xtf.junit5.annotations.SkipFor; import cz.xtf.junit5.annotations.SkipFors; @@ -46,7 +47,15 @@ public static ConditionEvaluationResult resolve(SkipFor skipFor) { "Only one of 'name', 'imageMetadataLabelName', 'imageMetadataLabelArchitecture' and 'subId' can be presented in 'SkipFor' annotation."); } - Image image = Image.resolve(skipFor.image()); + Image image = null; + try { + image = Image.resolve(skipFor.image()); + } catch (UnknownImageException uie) { + return ConditionEvaluationResult.enabled( + "Cannot get image for '" + skipFor.image() + + "' therefore cannot evaluate skip condition properly. Continue in test."); + } + Matcher matcher; if (!skipFor.name().equals("")) {