diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 1069ae0912024..5023495fbfc90 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -3373,11 +3373,6 @@ quarkus-test-kubernetes-client ${project.version} - - io.quarkus - quarkus-test-openshift-client - ${project.version} - io.quarkus quarkus-test-amazon-lambda diff --git a/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java b/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java index 91fbeec567369..b1a5a85c83bd8 100644 --- a/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java +++ b/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/KubernetesClientProcessor.java @@ -18,10 +18,8 @@ import io.fabric8.kubernetes.api.builder.VisitableBuilder; import io.fabric8.kubernetes.api.model.AnyType; import io.fabric8.kubernetes.api.model.IntOrString; -import io.fabric8.kubernetes.api.model.KubeSchema; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.KubernetesResourceList; -import io.fabric8.kubernetes.api.model.ValidationSchema; import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.CustomResource; import io.fabric8.kubernetes.client.DefaultKubernetesClient; @@ -64,10 +62,8 @@ public class KubernetesClientProcessor { private static final DotName RESOURCE_EVENT_HANDLER = DotName .createSimple(io.fabric8.kubernetes.client.informers.ResourceEventHandler.class.getName()); private static final DotName KUBERNETES_RESOURCE = DotName.createSimple(KubernetesResource.class.getName()); - private static final DotName VALIDATION_SCHEMA = DotName.createSimple(ValidationSchema.class.getName()); private static final DotName KUBERNETES_RESOURCE_LIST = DotName .createSimple(KubernetesResourceList.class.getName()); - private static final DotName KUBE_SCHEMA = DotName.createSimple(KubeSchema.class.getName()); private static final DotName VISITABLE_BUILDER = DotName.createSimple(VisitableBuilder.class.getName()); private static final DotName CUSTOM_RESOURCE = DotName.createSimple(CustomResource.class.getName()); @@ -174,10 +170,8 @@ public void process(ApplicationIndexBuildItem applicationIndex, CombinedIndexBui ignoredJsonDeserializationClasses.produce(new IgnoreJsonDeserializeClassBuildItem(ignoreJsonDeserialization)); // we also ignore some classes that are annotated with @JsonDeserialize that would force the registration of the entire model - ignoredJsonDeserializationClasses.produce(new IgnoreJsonDeserializeClassBuildItem(KUBE_SCHEMA)); ignoredJsonDeserializationClasses.produce(new IgnoreJsonDeserializeClassBuildItem(KUBERNETES_RESOURCE_LIST)); ignoredJsonDeserializationClasses.produce(new IgnoreJsonDeserializeClassBuildItem(KUBERNETES_RESOURCE)); - ignoredJsonDeserializationClasses.produce(new IgnoreJsonDeserializeClassBuildItem(VALIDATION_SCHEMA)); final String[] deserializerClasses = fullIndex .getAllKnownSubclasses(DotName.createSimple("com.fasterxml.jackson.databind.JsonDeserializer")) diff --git a/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/CertUtilsSubstitutions.java b/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/CertUtilsSubstitutions.java deleted file mode 100644 index dd884d8257ac5..0000000000000 --- a/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/CertUtilsSubstitutions.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.quarkus.kubernetes.client.runtime.graal; - -import java.io.IOException; -import java.io.InputStream; -import java.security.PrivateKey; - -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; - -@TargetClass(className = "io.fabric8.kubernetes.client.internal.CertUtils", onlyWith = NoBouncyCastleOpenSSL.class) -public final class CertUtilsSubstitutions { - - @Substitute - static PrivateKey handleECKey(InputStream keyInputStream) throws IOException { - throw new RuntimeException( - "EC Keys are not supported when using the native binary, please add the org.bouncycastle:bcpkix-jdk18on dependency"); - } -} diff --git a/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/Fabric8VertxHttpClientFactoryDelete.java b/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/Fabric8VertxHttpClientFactoryDelete.java new file mode 100644 index 0000000000000..84aba1e43ee2a --- /dev/null +++ b/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/Fabric8VertxHttpClientFactoryDelete.java @@ -0,0 +1,9 @@ +package io.quarkus.kubernetes.client.runtime.graal; + +import com.oracle.svm.core.annotate.Delete; +import com.oracle.svm.core.annotate.TargetClass; + +@TargetClass(className = "io.fabric8.kubernetes.client.vertx.VertxHttpClientFactory") +@Delete +public final class Fabric8VertxHttpClientFactoryDelete { +} diff --git a/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/NoBouncyCastleOpenSSL.java b/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/NoBouncyCastleOpenSSL.java deleted file mode 100644 index 2e39f457f1823..0000000000000 --- a/extensions/kubernetes-client/runtime/src/main/java/io/quarkus/kubernetes/client/runtime/graal/NoBouncyCastleOpenSSL.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.quarkus.kubernetes.client.runtime.graal; - -import java.util.Arrays; -import java.util.function.BooleanSupplier; - -class NoBouncyCastleOpenSSL implements BooleanSupplier { - static final String ORG_BOUNCYCASTLE_OPENSSL_PACKAGE = "org.bouncycastle.openssl"; - static final Boolean ORG_BOUNCYCASTLE_OPENSSL_AVAILABLE = Arrays.asList(Package.getPackages()).stream() - .map(p -> p.getName()).anyMatch(p -> p.startsWith(ORG_BOUNCYCASTLE_OPENSSL_PACKAGE)); - - @Override - public boolean getAsBoolean() { - return !ORG_BOUNCYCASTLE_OPENSSL_AVAILABLE; - } -} \ No newline at end of file diff --git a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftDeployer.java b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftDeployer.java index cdcc28b0128e2..5e8368df0b7eb 100644 --- a/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftDeployer.java +++ b/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/OpenshiftDeployer.java @@ -26,7 +26,7 @@ public void checkEnvironment(Optional> egressRouters() { - throw new RuntimeException(Constants.ERROR_MESSAGE); - } - - @Substitute - public NonNamespaceOperation> imageRegistryOperatorConfigs() { + public NonNamespaceOperation> helmChartRepositories() { throw new RuntimeException(Constants.ERROR_MESSAGE); } @@ -75,7 +68,7 @@ public MixedOperation> operatorPKIs() { + public MixedOperation> projectHelmChartRepositories() { throw new RuntimeException(Constants.ERROR_MESSAGE); } diff --git a/extensions/openshift-client/runtime/src/main/java/io/quarkus/it/openshift/client/runtime/graal/OperatorSubstitutions.java b/extensions/openshift-client/runtime/src/main/java/io/quarkus/it/openshift/client/runtime/graal/OperatorSubstitutions.java index 3730608f29f24..ad0dea61d1b61 100644 --- a/extensions/openshift-client/runtime/src/main/java/io/quarkus/it/openshift/client/runtime/graal/OperatorSubstitutions.java +++ b/extensions/openshift-client/runtime/src/main/java/io/quarkus/it/openshift/client/runtime/graal/OperatorSubstitutions.java @@ -6,6 +6,15 @@ import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetClass; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; +import io.fabric8.kubernetes.client.dsl.Resource; +import io.fabric8.openshift.api.model.operator.imageregistry.v1.Config; +import io.fabric8.openshift.api.model.operator.imageregistry.v1.ConfigList; +import io.fabric8.openshift.api.model.operator.network.v1.EgressRouter; +import io.fabric8.openshift.api.model.operator.network.v1.EgressRouterList; +import io.fabric8.openshift.api.model.operator.network.v1.OperatorPKI; +import io.fabric8.openshift.api.model.operator.network.v1.OperatorPKIList; import io.fabric8.openshift.client.dsl.OpenShiftOperatorAPIGroupDSL; /** @@ -14,10 +23,28 @@ @TargetClass(className = "io.fabric8.openshift.client.impl.OpenShiftClientImpl", onlyWith = OperatorSubstitutions.NoOpenShiftOperatorModel.class) public final class OperatorSubstitutions { + @Substitute + public MixedOperation> egressRouters() { + throw new RuntimeException(OperatorSubstitutions.Constants.ERROR_MESSAGE); + } + + @Substitute + public NonNamespaceOperation> imageRegistryOperatorConfigs() { + throw new RuntimeException(OperatorSubstitutions.Constants.ERROR_MESSAGE); + } + @Substitute public OpenShiftOperatorAPIGroupDSL operator() { - throw new RuntimeException( - "OpenShift Operator API is not available, please add the openshift-model-operator module to your classpath"); + throw new RuntimeException(OperatorSubstitutions.Constants.ERROR_MESSAGE); + } + + @Substitute + public MixedOperation> operatorPKIs() { + throw new RuntimeException(OperatorSubstitutions.Constants.ERROR_MESSAGE); + } + + static final class Constants { + private static final String ERROR_MESSAGE = "OpenShift Operator API is not available, please add the openshift-model-operator module to your classpath"; } static final class NoOpenShiftOperatorModel implements BooleanSupplier { diff --git a/integration-tests/kubernetes-client/pom.xml b/integration-tests/kubernetes-client/pom.xml index 3f7bd5bfd35b7..b6544bb95c4ae 100644 --- a/integration-tests/kubernetes-client/pom.xml +++ b/integration-tests/kubernetes-client/pom.xml @@ -64,11 +64,6 @@ quarkus-test-kubernetes-client test - - io.quarkus - quarkus-test-openshift-client - test - org.assertj assertj-core diff --git a/integration-tests/kubernetes-client/src/test/java/io/quarkus/it/kubernetes/client/OpenShiftTestServerTest.java b/integration-tests/kubernetes-client/src/test/java/io/quarkus/it/kubernetes/client/OpenShiftTestServerTest.java deleted file mode 100644 index 37b2570d6c70c..0000000000000 --- a/integration-tests/kubernetes-client/src/test/java/io/quarkus/it/kubernetes/client/OpenShiftTestServerTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package io.quarkus.it.kubernetes.client; - -import static org.assertj.core.api.Assertions.assertThat; - -import java.util.Base64; -import java.util.function.Consumer; - -import jakarta.inject.Inject; - -import org.junit.jupiter.api.Test; - -import io.fabric8.kubernetes.api.model.ConfigMapBuilder; -import io.fabric8.kubernetes.api.model.SecretBuilder; -import io.fabric8.openshift.api.model.ProjectBuilder; -import io.fabric8.openshift.client.OpenShiftClient; -import io.fabric8.openshift.client.server.mock.OpenShiftServer; -import io.quarkus.test.junit.QuarkusTest; -import io.quarkus.test.kubernetes.client.OpenShiftTestServer; -import io.quarkus.test.kubernetes.client.WithOpenShiftTestServer; - -@WithOpenShiftTestServer(setup = OpenShiftTestServerTest.CrudEnvironmentPreparation.class) -@QuarkusTest -class OpenShiftTestServerTest { - - @OpenShiftTestServer - private OpenShiftServer mockServer; - - @Inject - OpenShiftClient client; - - @Test - void testInjectionDefaultsToCrud() { - client.projects().createOrReplace(new ProjectBuilder() - .withNewMetadata().withName("example-project").addToLabels("project", "crud-is-true").endMetadata() - .build()); - assertThat(client) - .returns("crud-is-true", - c -> c.projects().withName("example-project").get().getMetadata().getLabels().get("project")); - } - - public static final class CrudEnvironmentPreparation implements Consumer { - - @Override - public void accept(OpenShiftServer openShiftServer) { - final OpenShiftClient oc = openShiftServer.getOpenshiftClient(); - oc.configMaps().createOrReplace(new ConfigMapBuilder() - .withNewMetadata().withName("cmap1").endMetadata() - .addToData("dummy", "I'm required") - .build()); - oc.configMaps().createOrReplace(new ConfigMapBuilder() - .withNewMetadata().withName("cmap2").endMetadata() - .addToData("dummysecret", "dumb") - .addToData("overridden.secret", "Alex") - .addToData("some.prop1", "I'm required") - .addToData("some.prop2", "I'm required (2)") - .addToData("some.prop3", "I'm required (3)") - .addToData("some.prop4", "I'm required (4)") - .addToData("some.prop5", "I'm required (5)") - .build()); - oc.secrets().createOrReplace(new SecretBuilder() - .withNewMetadata().withName("s1").endMetadata() - .addToData("secret.prop1", encodeValue("s1cret")) - .addToData("secret.prop2", encodeValue("s2cret")) - .addToData("secret.prop3", encodeValue("s3cret")) - .addToData("secret.prop4", encodeValue("s4cret")) - .build()); - } - } - - private static String encodeValue(String value) { - return Base64.getEncoder().encodeToString(value.getBytes()); - } -} diff --git a/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml b/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml index fefc9e6d1d859..c9a17e68fa544 100644 --- a/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml +++ b/integration-tests/kubernetes/quarkus-standard-way-kafka/pom.xml @@ -47,37 +47,23 @@ io.fabric8 - kubernetes-model + kubernetes-model-core + test + + + io.fabric8 + kubernetes-model-apps + test + + + io.fabric8 + openshift-model test - - - javax.annotation - javax.annotation-api - - - javax.xml.bind - jaxb-api - - - jakarta.xml.bind - jakarta.xml.bind-api - - io.fabric8 knative-model test - - - javax.annotation - javax.annotation-api - - - javax.xml.bind - jaxb-api - - com.fasterxml.jackson.dataformat diff --git a/integration-tests/kubernetes/quarkus-standard-way/pom.xml b/integration-tests/kubernetes/quarkus-standard-way/pom.xml index 0b3fc615a4a7f..aa95bd0ea16d4 100644 --- a/integration-tests/kubernetes/quarkus-standard-way/pom.xml +++ b/integration-tests/kubernetes/quarkus-standard-way/pom.xml @@ -51,8 +51,12 @@ io.fabric8 - kubernetes-model + openshift-model test + + + io.fabric8 + kubernetes-model-core javax.annotation diff --git a/integration-tests/openshift-client/pom.xml b/integration-tests/openshift-client/pom.xml index a0b19a6b346e6..a5bb07ea7c7d1 100644 --- a/integration-tests/openshift-client/pom.xml +++ b/integration-tests/openshift-client/pom.xml @@ -39,11 +39,15 @@ io.fabric8 openshift-model-operator + + io.fabric8 + openshift-model-operatorhub + io.quarkus - quarkus-test-openshift-client + quarkus-test-kubernetes-client ${project.version} test diff --git a/integration-tests/openshift-client/src/test/java/io/quarkus/it/openshift/client/OpenShiftClientTest.java b/integration-tests/openshift-client/src/test/java/io/quarkus/it/openshift/client/OpenShiftClientTest.java index 0398a7bb4bc0b..67edaac333417 100644 --- a/integration-tests/openshift-client/src/test/java/io/quarkus/it/openshift/client/OpenShiftClientTest.java +++ b/integration-tests/openshift-client/src/test/java/io/quarkus/it/openshift/client/OpenShiftClientTest.java @@ -6,22 +6,22 @@ import org.junit.jupiter.api.Test; import io.fabric8.kubernetes.api.model.PodListBuilder; +import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; import io.fabric8.openshift.api.model.Route; import io.fabric8.openshift.api.model.RouteBuilder; import io.fabric8.openshift.client.NamespacedOpenShiftClient; -import io.fabric8.openshift.client.server.mock.OpenShiftMockServer; import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import io.quarkus.test.kubernetes.client.KubernetesMockServerTestResource; import io.quarkus.test.kubernetes.client.MockServer; -import io.quarkus.test.kubernetes.client.OpenShiftMockServerTestResource; import io.restassured.RestAssured; -@QuarkusTestResource(OpenShiftMockServerTestResource.class) +@QuarkusTestResource(KubernetesMockServerTestResource.class) @QuarkusTest public class OpenShiftClientTest { @MockServer - private OpenShiftMockServer mockServer; + private KubernetesMockServer mockServer; @Test void createRoute() { @@ -36,7 +36,7 @@ void createRoute() { .andReturn(200, expectedRoute) .once(); - NamespacedOpenShiftClient openShiftClient = mockServer.createOpenShiftClient(); + NamespacedOpenShiftClient openShiftClient = mockServer.createClient().adapt(NamespacedOpenShiftClient.class); openShiftClient.routes() .create(new RouteBuilder().withNewMetadata().withName("myroute").withNamespace("test").endMetadata().build()); Route route = openShiftClient.routes().inNamespace("test").withName("myroute").get(); diff --git a/pom.xml b/pom.xml index f97057615cc69..05a9946f3aeea 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ 0.8.12 - 6.13.4 + 7.0.1 5.5.0 6.6.4.Final 4.13.0 diff --git a/test-framework/kubernetes-client/pom.xml b/test-framework/kubernetes-client/pom.xml index dd147652f2d7f..8dbaf40f83a7c 100644 --- a/test-framework/kubernetes-client/pom.xml +++ b/test-framework/kubernetes-client/pom.xml @@ -46,17 +46,16 @@ io.fabric8 kubernetes-server-mock - - - io.fabric8 - kubernetes-httpclient-okhttp - - io.fabric8 kubernetes-httpclient-vertx + + junit + junit + ${junit4.version} + jakarta.annotation jakarta.annotation-api diff --git a/test-framework/openshift-client/pom.xml b/test-framework/openshift-client/pom.xml deleted file mode 100644 index 2de4d36c34587..0000000000000 --- a/test-framework/openshift-client/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - - - io.quarkus - quarkus-test-framework - 999-SNAPSHOT - - - quarkus-test-openshift-client - Quarkus - Test Framework - OpenShift Client Mock Server support - - - io.quarkus - quarkus-test-kubernetes-client - - - io.fabric8 - openshift-server-mock - - - io.fabric8 - kubernetes-httpclient-okhttp - - - javax.annotation - javax.annotation-api - - - jakarta.xml.bind - jakarta.xml.bind-api - - - javax.xml.bind - jaxb-api - - - jakarta.xml.bind - jakarta.xml.bind-api - - - io.sundr - * - - - - - jakarta.annotation - jakarta.annotation-api - - - jakarta.xml.bind - jakarta.xml.bind-api - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce - ${maven-enforcer-plugin.phase} - - enforce - - - - - - - - classpath:enforcer-rules/quarkus-banned-dependencies.xml - - - - - - - - - diff --git a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftMockServerTestResource.java b/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftMockServerTestResource.java deleted file mode 100644 index 6cbadc2e46dc5..0000000000000 --- a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftMockServerTestResource.java +++ /dev/null @@ -1,19 +0,0 @@ -package io.quarkus.test.kubernetes.client; - -import io.fabric8.openshift.client.server.mock.OpenShiftMockServer; - -/** - * @deprecated use {@link OpenShiftServerTestResource} - */ -@Deprecated -public class OpenShiftMockServerTestResource extends KubernetesMockServerTestResource { - - protected OpenShiftMockServer createMockServer() { - return new OpenShiftMockServer(useHttps()); - } - - @Override - protected Class getInjectedClass() { - return OpenShiftMockServer.class; - } -} diff --git a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftServerTestResource.java b/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftServerTestResource.java deleted file mode 100644 index bb2d28f17f5dc..0000000000000 --- a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftServerTestResource.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.quarkus.test.kubernetes.client; - -import java.lang.annotation.Annotation; -import java.util.function.Consumer; - -import io.fabric8.openshift.client.NamespacedOpenShiftClient; -import io.fabric8.openshift.client.server.mock.OpenShiftServer; -import io.quarkus.test.common.QuarkusTestResourceConfigurableLifecycleManager; - -public class OpenShiftServerTestResource extends AbstractKubernetesTestResource - implements QuarkusTestResourceConfigurableLifecycleManager { - - private boolean https = false; - private boolean crud = true; - private Consumer setup; - - @Override - public void init(WithOpenShiftTestServer annotation) { - this.https = annotation.https(); - this.crud = annotation.crud(); - try { - this.setup = annotation.setup().getDeclaredConstructor().newInstance(); - } catch (ReflectiveOperationException e) { - throw new RuntimeException(e); - } - } - - @Override - protected NamespacedOpenShiftClient getClient() { - return server.getOpenshiftClient(); - } - - @Override - protected void initServer() { - server.before(); - } - - @Override - protected void configureServer() { - if (setup != null) - setup.accept(server); - } - - @Override - protected OpenShiftServer createServer() { - return new OpenShiftServer(https, crud); - } - - @Override - public void stop() { - if (server != null) { - server.after(); - server = null; - } - } - - @Override - protected Class getInjectedClass() { - return OpenShiftServer.class; - } - - @Override - protected Class getInjectionAnnotation() { - return OpenShiftTestServer.class; - } -} diff --git a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftTestServer.java b/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftTestServer.java deleted file mode 100644 index 6f855547c9645..0000000000000 --- a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/OpenShiftTestServer.java +++ /dev/null @@ -1,17 +0,0 @@ -package io.quarkus.test.kubernetes.client; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import io.fabric8.openshift.client.server.mock.OpenShiftServer; - -/** - * Used to specify that the field should be injected with the mock OpenShift API server - * Can only be used on type {@link OpenShiftServer} - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface OpenShiftTestServer { -} diff --git a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/WithOpenShiftTestServer.java b/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/WithOpenShiftTestServer.java deleted file mode 100644 index 9d978bdd8c0a9..0000000000000 --- a/test-framework/openshift-client/src/main/java/io/quarkus/test/kubernetes/client/WithOpenShiftTestServer.java +++ /dev/null @@ -1,41 +0,0 @@ -package io.quarkus.test.kubernetes.client; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.function.Consumer; - -import io.fabric8.openshift.client.server.mock.OpenShiftServer; -import io.quarkus.test.common.QuarkusTestResource; - -/** - * Use on your test resource to get a mock {@link OpenShiftServer} spawn up, and injectable with {@link OpenShiftTestServer}. - * This annotation is only active when used on a test class, and only for this test class. - */ -@QuarkusTestResource(value = OpenShiftServerTestResource.class, restrictToAnnotatedClass = true) -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface WithOpenShiftTestServer { - - /** - * Start it with HTTPS - */ - boolean https() default false; - - /** - * Start it in CRUD mode - */ - boolean crud() default true; - - /** - * Setup class to call after the mock server is created, for custom setup. - */ - Class> setup() default NO_SETUP.class; - - class NO_SETUP implements Consumer { - @Override - public void accept(OpenShiftServer t) { - } - } -} diff --git a/test-framework/pom.xml b/test-framework/pom.xml index fef1a28244cb7..075df12ddfb11 100644 --- a/test-framework/pom.xml +++ b/test-framework/pom.xml @@ -20,7 +20,6 @@ grpc derby kubernetes-client - openshift-client junit5-config junit5-internal junit5