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

Fix compilation failure due to removed method #803

Merged
merged 1 commit into from
Jun 14, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import io.fabric8.kubernetes.api.model.VolumeMount;
import io.fabric8.kubernetes.api.model.VolumeMountBuilder;
import io.fabric8.kubernetes.client.CustomResource;
import io.fabric8.kubernetes.client.KubernetesClientBuilder;
import io.fabric8.kubernetes.client.dsl.ContainerResource;
import io.fabric8.kubernetes.client.dsl.PodResource;
import io.fabric8.kubernetes.client.utils.Serialization;
Expand All @@ -65,7 +66,6 @@
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 @@ -108,16 +108,20 @@ private OpenShiftClient(String scenarioId) {
if (ENABLED_EPHEMERAL_NAMESPACES.getAsBoolean()) {
currentNamespace = createProject();
OpenShiftConfig config = new OpenShiftConfigBuilder().withTrustCerts(true).withNamespace(currentNamespace).build();
client = new OpenShiftClientImpl(config);
client = createClient(config);
} else {
OpenShiftConfig config = new OpenShiftConfigBuilder().withTrustCerts(true).build();
client = new OpenShiftClientImpl(config);
client = createClient(config);
currentNamespace = client.getNamespace();
}
isClientReady = true;
kn = client.adapt(KnativeClient.class);
}

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

public static OpenShiftClient create(String scenarioId) {
return new OpenShiftClient(scenarioId);
}
Expand Down