From 5eb568763f76145bdf3d605f87979846f4e0d8fe Mon Sep 17 00:00:00 2001 From: Fabio Burzigotti Date: Mon, 12 Feb 2024 17:08:45 +0100 Subject: [PATCH] [issue 146] - Fix Eap7ImageOpenShiftApplication --- .../openshift/Eap7ImageOpenShiftApplication.java | 14 +++++++++++++- .../openshift/ProvisionerCleanupTestCase.java | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/provisioners/src/main/java/org/jboss/intersmash/application/openshift/Eap7ImageOpenShiftApplication.java b/provisioners/src/main/java/org/jboss/intersmash/application/openshift/Eap7ImageOpenShiftApplication.java index c1fb22399..685f14cb3 100644 --- a/provisioners/src/main/java/org/jboss/intersmash/application/openshift/Eap7ImageOpenShiftApplication.java +++ b/provisioners/src/main/java/org/jboss/intersmash/application/openshift/Eap7ImageOpenShiftApplication.java @@ -17,6 +17,8 @@ import java.util.Collections; import java.util.List; +import java.util.Map; +import java.util.Set; import org.jboss.intersmash.application.openshift.input.BinarySourceBuilder; import org.jboss.intersmash.application.openshift.input.BuildInput; @@ -24,6 +26,8 @@ import org.jboss.intersmash.application.openshift.input.GitSourceBuilder; import org.jboss.intersmash.provision.openshift.Eap7ImageOpenShiftProvisioner; +import cz.xtf.builder.builders.pod.PersistentVolumeClaim; +import cz.xtf.builder.builders.pod.VolumeMount; import io.fabric8.kubernetes.api.model.EnvVar; /** @@ -35,7 +39,7 @@ *
  • {@link Eap7ImageOpenShiftProvisioner}
  • * */ -public interface Eap7ImageOpenShiftApplication extends WildflyImageOpenShiftApplication, HasEnvVars { +public interface Eap7ImageOpenShiftApplication extends WildflyOpenShiftApplication, HasEnvVars { /** * Use the {@link BuildInputBuilder} to get instances @@ -47,6 +51,14 @@ public interface Eap7ImageOpenShiftApplication extends WildflyImageOpenShiftAppl */ BuildInput getBuildInput(); + /** + * Setup mount points to EAP 7 pod and persistent volume claims to be created. + * @return A {@link Map} instance storing PVCs needed by the EAP 7 application service + */ + default Map> getPersistentVolumeClaimMounts() { + return Collections.emptyMap(); + } + @Override default List getEnvVars() { return Collections.emptyList(); diff --git a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java index e38710152..fa9b91b4b 100644 --- a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java +++ b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java @@ -17,6 +17,7 @@ import java.util.stream.Stream; +import org.jboss.intersmash.provision.openshift.Eap7ImageOpenShiftProvisioner; import org.jboss.intersmash.provision.openshift.Eap7LegacyS2iBuildTemplateProvisioner; import org.jboss.intersmash.provision.openshift.MysqlImageOpenShiftProvisioner; import org.jboss.intersmash.provision.openshift.OpenShiftProvisioner; @@ -55,8 +56,12 @@ private static Stream provisionerProvider() { OpenShiftProvisionerTestBase.getPostgreSQLTemplateOpenShiftApplication())); } else if (IntersmashTestsuiteProperties.isProductizedTestExecutionProfileEnabled()) { return Stream.of( + // EAP latest GA new WildflyImageOpenShiftProvisioner( OpenShiftProvisionerTestBase.getWildflyOpenShiftLocalBinaryTargetServerApplication()), + // EAP 7 + new Eap7ImageOpenShiftProvisioner(OpenShiftProvisionerTestBase.getEap7OpenShiftImageApplication()), + // RHSSO new RhSsoTemplateOpenShiftProvisioner(OpenShiftProvisionerTestBase.getHttpsRhSso())); } else { throw new IllegalStateException(