diff --git a/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/InClusterCurl.java b/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/InClusterCurl.java index 927723209c..dd9748383b 100644 --- a/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/InClusterCurl.java +++ b/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/InClusterCurl.java @@ -21,11 +21,15 @@ public InClusterCurl(KubernetesClient client, String namespace) { } public String checkUrl(String url) { + return checkUrl("-s", "-o", "/dev/null", "-w", "%{http_code}", url); + } + + public String checkUrl(String... args) { String podName = KubernetesResourceUtil.sanitizeName("curl-" + UUID.randomUUID()); try { Pod curlPod = client.run().inNamespace(namespace) .withRunConfig(new RunConfigBuilder() - .withArgs("-s", "-o", "/dev/null", "-w", "%{http_code}", url) + .withArgs(args) .withName(podName) .withImage("curlimages/curl:7.78.0") .withRestartPolicy("Never")