Skip to content

Commit

Permalink
Add possibility to skip installation of the operator dependencies
Browse files Browse the repository at this point in the history
Property to skip installation of the operator dependencies for RHOAI/ODH
operator.
  • Loading branch information
jstourac committed Mar 10, 2024
1 parent 0a1ef5b commit 90f9391
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/odh/test/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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);

Expand Down
9 changes: 9 additions & 0 deletions src/test/java/io/odh/test/e2e/Abstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit 90f9391

Please sign in to comment.