diff --git a/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExecutionCondition.java b/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExecutionCondition.java index d08f9c506..98ccc1487 100644 --- a/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExecutionCondition.java +++ b/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExecutionCondition.java @@ -29,6 +29,10 @@ import cz.xtf.core.openshift.OpenShifts; import lombok.extern.slf4j.Slf4j; +/** + * Implements a JUnit {@link ExecutionCondition} that is used to control whether a test class workflow can be managed by + * {@link IntersmashExtension} + */ @Slf4j public class IntersmashExecutionCondition implements ExecutionCondition { diff --git a/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExtension.java b/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExtension.java index 1f4c722f6..32bec47df 100644 --- a/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExtension.java +++ b/core/src/main/java/org/jboss/intersmash/junit5/IntersmashExtension.java @@ -47,6 +47,10 @@ import cz.xtf.core.openshift.OpenShifts; import lombok.extern.slf4j.Slf4j; +/** + * Intersmash JUnit extension that handles the process of provisioning a cross-product scenario before starting the + * test execution. + */ @Slf4j public class IntersmashExtension implements BeforeAllCallback, AfterAllCallback, TestInstancePostProcessor { diff --git a/core/src/main/java/org/jboss/intersmash/provision/Provisioner.java b/core/src/main/java/org/jboss/intersmash/provision/Provisioner.java index 2ceff6e72..283d60f49 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/Provisioner.java +++ b/core/src/main/java/org/jboss/intersmash/provision/Provisioner.java @@ -20,7 +20,7 @@ import org.jboss.intersmash.application.Application; /** - * Application provisioner for deploying and undeploying the application. + * Application provisioner for deploying and undeploying a service, represented by a given {@link Application} instance. */ public interface Provisioner { diff --git a/core/src/main/java/org/jboss/intersmash/provision/ProvisionerFactory.java b/core/src/main/java/org/jboss/intersmash/provision/ProvisionerFactory.java index 4577ca7ef..235facd0c 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/ProvisionerFactory.java +++ b/core/src/main/java/org/jboss/intersmash/provision/ProvisionerFactory.java @@ -17,6 +17,10 @@ import org.jboss.intersmash.application.Application; +/** + * Define the contract for classes that return a suitable {@link Provisioner} for a given {@link Application} class. + * @param The type of the {@link Provisioner} that the factory implementation shall return. + */ public interface ProvisionerFactory { /** diff --git a/core/src/main/java/org/jboss/intersmash/provision/ProvisionerManager.java b/core/src/main/java/org/jboss/intersmash/provision/ProvisionerManager.java index e21b81c32..e50678a63 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/ProvisionerManager.java +++ b/core/src/main/java/org/jboss/intersmash/provision/ProvisionerManager.java @@ -19,8 +19,10 @@ import org.jboss.intersmash.application.Application; +/** + * Manager class to load the suitable {@link Provisioner} for a given {@link Application} instance, based on SPI. + */ public class ProvisionerManager { - /** * Get application provisioner based on interfaces the application does implement. * diff --git a/core/src/main/java/org/jboss/intersmash/provision/openshift/FailFastUtils.java b/core/src/main/java/org/jboss/intersmash/provision/openshift/FailFastUtils.java index 4429506da..3fad1caed 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/openshift/FailFastUtils.java +++ b/core/src/main/java/org/jboss/intersmash/provision/openshift/FailFastUtils.java @@ -17,11 +17,16 @@ import java.time.ZonedDateTime; +import cz.xtf.core.openshift.OpenShift; import cz.xtf.core.openshift.OpenShiftWaiters; import cz.xtf.core.openshift.OpenShifts; import cz.xtf.core.waiting.failfast.FailFastBuilder; import cz.xtf.core.waiting.failfast.FailFastCheck; +/** + * Helper class that leverages the XTF library fail-fast APIs in methods that can be used to control the + * Intersmash provisioning workflow. + */ public class FailFastUtils { private static String[] failFastEventMessages = new String[] { "Failed to pull image.*", diff --git a/core/src/main/java/org/jboss/intersmash/provision/openshift/OpenShiftUtils.java b/core/src/main/java/org/jboss/intersmash/provision/openshift/OpenShiftUtils.java index 90cec8a26..2869009e4 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/openshift/OpenShiftUtils.java +++ b/core/src/main/java/org/jboss/intersmash/provision/openshift/OpenShiftUtils.java @@ -19,6 +19,10 @@ import cz.xtf.core.openshift.OpenShift; +/** + * Helper class that leverages the XTF library {@link OpenShift} APIs in methods that can be used to control the + * Intersmash provisioning workflow. + */ public class OpenShiftUtils { public static void deleteResourcesWithLabel(OpenShift openShift, String labelKey, String labelValue) { openShift.deploymentConfigs().withLabel(labelKey, labelValue).delete(); diff --git a/core/src/main/java/org/jboss/intersmash/provision/openshift/WaitersUtil.java b/core/src/main/java/org/jboss/intersmash/provision/openshift/WaitersUtil.java index 904eba2eb..49966871d 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/openshift/WaitersUtil.java +++ b/core/src/main/java/org/jboss/intersmash/provision/openshift/WaitersUtil.java @@ -28,6 +28,10 @@ import io.fabric8.kubernetes.api.model.EndpointSubset; import io.fabric8.kubernetes.api.model.Endpoints; +/** + * Helper class that leverages the XTF library {@link Waiter} APIs in methods that can be used to control the + * Intersmash provisioning workflow. + */ public class WaitersUtil { public static Waiter serviceEndpointsAreReady(OpenShift openShift, String serviceName, int numOfPods, Integer... ports) { return new SimpleWaiter(() -> { diff --git a/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/CatalogSource.java b/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/CatalogSource.java index 78e782fe1..e375d4b94 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/CatalogSource.java +++ b/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/CatalogSource.java @@ -17,6 +17,9 @@ import io.fabric8.openshift.api.model.operatorhub.v1alpha1.CatalogSourceBuilder; +/** + * Wrapper for creating and using {@link io.fabric8.openshift.api.model.operatorhub.v1alpha1.CatalogSource} + */ public class CatalogSource extends io.fabric8.openshift.api.model.operatorhub.v1alpha1.CatalogSource implements OpenShiftResource { diff --git a/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/Subscription.java b/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/Subscription.java index dfb3f8d96..db76c3cc6 100644 --- a/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/Subscription.java +++ b/core/src/main/java/org/jboss/intersmash/provision/openshift/operator/resources/Subscription.java @@ -25,10 +25,9 @@ import io.fabric8.openshift.api.model.operatorhub.v1alpha1.SubscriptionFluent; /** - *

* The Subscription configures when and how to update a ClusterService, binds a ClusterService to a channel in a * CatalogSource and configures the update strategy for a ClusterService (automatic, manual approval, etc). - *

+ * *

This class is a wrapper for {@link io.fabric8.openshift.api.model.operatorhub.v1alpha1.Subscription} which * adds some capabilities

*