diff --git a/README.md b/README.md index 0dd8106a..afabe81f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ E2E test suite for opendatahub using fabric8 kubernetes client * **KUBE_TOKEN** - token of kube access (use instead of username/password) * **KUBE_URL** - url of the cluster (api url) * **PRODUCT** - odh or rhoai +* **SKIP_INSTALL_OPERATOR_DEPS** - skip installation of the odh/rhoai operator dependencies * **SKIP_INSTALL_OPERATOR** - skip odh/rhoai operator install * **SKIP_DEPLOY_DSCI_DSC** - skip odh/rhoai deploy of DSCI and DSC * **INSTALL_FILE** - yaml definition of operator (default is downloaded latest) diff --git a/src/main/java/io/odh/test/Environment.java b/src/main/java/io/odh/test/Environment.java index 7c68490e..e5ff456f 100644 --- a/src/main/java/io/odh/test/Environment.java +++ b/src/main/java/io/odh/test/Environment.java @@ -48,6 +48,7 @@ public class Environment { /** * Install operator odh/rhoai */ + private static final String SKIP_INSTALL_OPERATOR_DEPS_ENV = "SKIP_INSTALL_OPERATOR_DEPS"; private static final String SKIP_INSTALL_OPERATOR_ENV = "SKIP_INSTALL_OPERATOR"; public static final String SKIP_DEPLOY_DSCI_DSC_ENV = "SKIP_DEPLOY_DSCI_DSC"; @@ -81,6 +82,7 @@ public class Environment { public static final String KUBE_URL = getOrDefault(URL_ENV, null); //Install + public static final boolean SKIP_INSTALL_OPERATOR_DEPS = getOrDefault(SKIP_INSTALL_OPERATOR_DEPS_ENV, Boolean::valueOf, false); public static final boolean SKIP_INSTALL_OPERATOR = getOrDefault(SKIP_INSTALL_OPERATOR_ENV, Boolean::valueOf, false); public static final boolean SKIP_DEPLOY_DSCI_DSC = getOrDefault(SKIP_DEPLOY_DSCI_DSC_ENV, Boolean::valueOf, false); diff --git a/src/test/java/io/odh/test/e2e/Abstract.java b/src/test/java/io/odh/test/e2e/Abstract.java index 6820a126..29238286 100644 --- a/src/test/java/io/odh/test/e2e/Abstract.java +++ b/src/test/java/io/odh/test/e2e/Abstract.java @@ -4,6 +4,7 @@ */ package io.odh.test.e2e; +import io.odh.test.Environment; import io.odh.test.framework.listeners.ResourceManagerContextHandler; import io.odh.test.framework.listeners.TestVisualSeparator; import io.odh.test.framework.manager.ResourceManager; @@ -15,18 +16,26 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.extension.ExtendWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @ExtendWith(TestExceptionCallbackListener.class) @ExtendWith(ResourceManagerContextHandler.class) @TestInstance(TestInstance.Lifecycle.PER_CLASS) public abstract class Abstract implements TestVisualSeparator { + private static final Logger LOGGER = LoggerFactory.getLogger(Abstract.class); + static { ResourceManager.getInstance(); } @BeforeAll void setupDependencies() { + if (Environment.SKIP_INSTALL_OPERATOR_DEPS) { + LOGGER.info("Operator dependencies install is skipped"); + return; + } PipelinesOperator.deployOperator(); ServiceMeshOperator.deployOperator(); ServerlessOperator.deployOperator();