From 52a7d8ec07a98cbdb523610bd661e368c74f84c0 Mon Sep 17 00:00:00 2001 From: David Kornel Date: Mon, 8 Jan 2024 10:56:59 +0100 Subject: [PATCH] Use string contains methods instead of binary operators (#45) --- src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java | 2 +- src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 77dea803..d168e427 100644 --- a/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java +++ b/src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java @@ -30,7 +30,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 != Environment.PRODUCT_DEFAULT ? "2.4.0" : "v.2.4.0"; + private final String startingVersion = !Environment.PRODUCT.equals(Environment.PRODUCT_DEFAULT) ? "2.4.0" : "v.2.4.0"; @Test @Disabled("Tested only for upgrades from 2.4+ so we are waiting for 2.5 release") diff --git a/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java b/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java index 5e7d7133..db043e99 100644 --- a/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java +++ b/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java @@ -102,7 +102,7 @@ public void deployNotebook(String namespace, String name) throws IOException { ResourceManager.getInstance().createResourceWithoutWait(pvc); Notebook notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name)).build(); - if (Environment.PRODUCT != Environment.PRODUCT_DEFAULT) { + if (!Environment.PRODUCT.equals(Environment.PRODUCT_DEFAULT)) { notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name)) .editSpec() .editNotebookspecTemplate()