Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another fix due to suddenly deleted public API #808

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions examples/https/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<artifactId>quarkus-test-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus.qe</groupId>
<artifactId>quarkus-test-openshift</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
25 changes: 25 additions & 0 deletions examples/https/src/test/java/io/quarkus/qe/HttpIT.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.quarkus.qe;

import static io.quarkus.test.utils.AwaitilityUtils.untilAsserted;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.is;

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Test;

import io.quarkus.test.scenarios.QuarkusScenario;
import io.restassured.specification.RequestSpecification;

@QuarkusScenario
public class HttpIT {

private final RequestSpecification spec = given();

@Test
public void shouldSayHelloWorld() {
untilAsserted(() -> spec.get("/greeting")
.then()
.statusCode(HttpStatus.SC_OK)
.body(is("Hello World!")));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.quarkus.qe;

import io.quarkus.test.scenarios.OpenShiftScenario;

@OpenShiftScenario
public class OpenShiftHttpIT extends HttpIT {

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import io.fabric8.openshift.client.NamespacedOpenShiftClient;
import io.fabric8.openshift.client.OpenShiftConfig;
import io.fabric8.openshift.client.OpenShiftConfigBuilder;
import io.fabric8.openshift.client.impl.OpenShiftClientImpl;
import io.quarkus.test.bootstrap.Service;
import io.quarkus.test.configuration.PropertyLookup;
import io.quarkus.test.logging.Log;
Expand Down Expand Up @@ -98,7 +99,7 @@ public final class OpenShiftClient {
private static final String OC = "oc";

private final String currentNamespace;
private final NamespacedOpenShiftClient client;
private final OpenShiftClientImpl client;
private final KnativeClient kn;
private final String scenarioId;
private boolean isClientReady;
Expand All @@ -118,8 +119,10 @@ private OpenShiftClient(String scenarioId) {
kn = client.adapt(KnativeClient.class);
}

private static NamespacedOpenShiftClient createClient(OpenShiftConfig config) {
return new KubernetesClientBuilder().withConfig(config).build().adapt(NamespacedOpenShiftClient.class);
private static OpenShiftClientImpl createClient(OpenShiftConfig config) {
return new KubernetesClientBuilder().withConfig(config).build()
.adapt(NamespacedOpenShiftClient.class)
.adapt(OpenShiftClientImpl.class);
}

public static OpenShiftClient create(String scenarioId) {
Expand Down