diff --git a/src/main/java/io/odh/test/Environment.java b/src/main/java/io/odh/test/Environment.java index 9310a0b6..61398791 100644 --- a/src/main/java/io/odh/test/Environment.java +++ b/src/main/java/io/odh/test/Environment.java @@ -61,6 +61,7 @@ public class Environment { private static final String OLM_OPERATOR_VERSION_ENV = "OLM_OPERATOR_VERSION"; private static final String OLM_OPERATOR_CHANNEL_ENV = "OLM_OPERATOR_CHANNEL"; private static final String OPERATOR_INSTALL_TYPE_ENV = "OPERATOR_INSTALL_TYPE"; + private static final String OLM_UPGRADE_STARTING_VERSION_ENV = "OLM_UPGRADE_STARTING_VERSION"; public static final String PRODUCT_DEFAULT = "odh"; @@ -87,6 +88,7 @@ public class Environment { public static final String OLM_SOURCE_NAMESPACE = getOrDefault(OLM_SOURCE_NAMESPACE_ENV, "openshift-marketplace"); public static final String OLM_OPERATOR_CHANNEL = getOrDefault(OLM_OPERATOR_CHANNEL_ENV, OdhConstants.OLM_OPERATOR_CHANNEL); public static final String OLM_OPERATOR_VERSION = getOrDefault(OLM_OPERATOR_VERSION_ENV, OdhConstants.OLM_OPERATOR_VERSION); + public static final String OLM_UPGRADE_STARTING_VERSION = getOrDefault(OLM_UPGRADE_STARTING_VERSION_ENV, OdhConstants.OLM_UPGRADE_STARTING_OPERATOR_VERSION); public static final String OPERATOR_INSTALL_TYPE = getOrDefault(OPERATOR_INSTALL_TYPE_ENV, InstallTypes.BUNDLE.toString()); diff --git a/src/main/java/io/odh/test/OdhConstants.java b/src/main/java/io/odh/test/OdhConstants.java index 814a19f7..46399a7f 100644 --- a/src/main/java/io/odh/test/OdhConstants.java +++ b/src/main/java/io/odh/test/OdhConstants.java @@ -23,7 +23,9 @@ private OdhConstants() { } private static final String ODH_OLM_SOURCE_NAME = "community-operators"; private static final String ODH_OLM_APP_BUNDLE_PREFIX = "opendatahub-operator"; private static final String ODH_OLM_OPERATOR_CHANNEL = "fast"; + // TODO - should be changed after 2.5 release private static final String ODH_OLM_OPERATOR_VERSION = "v2.4.0"; + private static final String ODH_OLM_UPGRADE_STARTING_OPERATOR_VERSION = "v2.4.0"; // RHOAI private static final String RHOAI_CONTROLLERS_NAMESPACE = "redhat-ods-applications"; @@ -37,6 +39,7 @@ private OdhConstants() { } private static final String RHOAI_OLM_APP_BUNDLE_PREFIX = "rhods-operator"; private static final String RHOAI_OLM_OPERATOR_CHANNEL = "stable"; private static final String RHOAI_OLM_OPERATOR_VERSION = "2.5.0"; + private static final String RHOAI_OLM_UPGRADE_STARTING_OPERATOR_VERSION = "2.4.0"; // Public part public static final String CODEFLARE_DEPLOYMENT_NAME = "codeflare-operator-manager"; @@ -62,6 +65,7 @@ private OdhConstants() { } public static final String OLM_OPERATOR_VERSION = getOdhOrRhoai(ODH_OLM_OPERATOR_VERSION, RHOAI_OLM_OPERATOR_VERSION); public static final String OLM_SOURCE_NAME = getOdhOrRhoai(ODH_OLM_SOURCE_NAME, RHOAI_OLM_SOURCE_NAME); public static final String OLM_OPERATOR_CHANNEL = getOdhOrRhoai(ODH_OLM_OPERATOR_CHANNEL, RHOAI_OLM_OPERATOR_CHANNEL); + public static final String OLM_UPGRADE_STARTING_OPERATOR_VERSION = getOdhOrRhoai(ODH_OLM_UPGRADE_STARTING_OPERATOR_VERSION, RHOAI_OLM_UPGRADE_STARTING_OPERATOR_VERSION); private static T getOdhOrRhoai(T odhValue, T rhoaiValue) { T returnValue = odhValue; diff --git a/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java b/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java index 8ee9de4c..775852e7 100644 --- a/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java +++ b/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java @@ -28,7 +28,7 @@ public class OlmUpgradeST extends UpgradeAbstract { private static final Logger LOGGER = LoggerFactory.getLogger(OlmUpgradeST.class); private static final String DS_PROJECT_NAME = "upgrade-dsc"; - private final String startingVersion = !Environment.PRODUCT.equals(Environment.PRODUCT_DEFAULT) ? "2.4.0" : "v.2.4.0"; + private final String startingVersion = Environment.OLM_UPGRADE_STARTING_VERSION; @Test @Disabled("Tested only for upgrades from 2.4+ so we are waiting for 2.5 release")