diff --git a/pom.xml b/pom.xml index d6fa47c9..a51c1bfe 100644 --- a/pom.xml +++ b/pom.xml @@ -332,6 +332,17 @@ + + + all + + false + + standard, + upgrade + + + diff --git a/src/test/java/io/odh/test/e2e/standard/StandardAbstract.java b/src/test/java/io/odh/test/e2e/standard/StandardAbstract.java index d125914e..bd462322 100644 --- a/src/test/java/io/odh/test/e2e/standard/StandardAbstract.java +++ b/src/test/java/io/odh/test/e2e/standard/StandardAbstract.java @@ -14,6 +14,7 @@ import io.odh.test.install.OlmInstall; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -22,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.fail; +@Tag("standard") @ExtendWith(OdhResourceCleaner.class) @ExtendWith(ResourceManagerDeleteHandler.class) public class StandardAbstract extends Abstract { diff --git a/src/test/java/io/odh/test/e2e/upgrade/BundleUpgradeST.java b/src/test/java/io/odh/test/e2e/upgrade/BundleUpgradeST.java index fba015bb..60b1ec07 100644 --- a/src/test/java/io/odh/test/e2e/upgrade/BundleUpgradeST.java +++ b/src/test/java/io/odh/test/e2e/upgrade/BundleUpgradeST.java @@ -13,12 +13,15 @@ import io.fabric8.kubernetes.api.model.Quantity; import io.odh.test.Environment; import io.odh.test.OdhAnnotationsLabels; +import io.odh.test.OdhConstants; +import io.odh.test.TestConstants; import io.odh.test.e2e.Abstract; import io.odh.test.framework.listeners.OdhResourceCleaner; import io.odh.test.framework.listeners.ResourceManagerDeleteHandler; import io.odh.test.framework.manager.ResourceManager; import io.odh.test.framework.manager.resources.NotebookResource; import io.odh.test.install.BundleInstall; +import io.odh.test.utils.DeploymentUtils; import io.odh.test.utils.PodUtils; import io.opendatahub.datasciencecluster.v1.DataScienceCluster; import io.opendatahub.datasciencecluster.v1.DataScienceClusterBuilder; @@ -45,6 +48,10 @@ import java.io.IOException; import java.util.Map; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.core.IsNot.not; + @Tag("upgrade") @ExtendWith(OdhResourceCleaner.class) @ExtendWith(ResourceManagerDeleteHandler.class) @@ -68,6 +75,8 @@ void testUpgradeBundle() throws IOException { baseBundle = new BundleInstall(Environment.INSTALL_FILE_PREVIOUS_PATH); baseBundle.createWithoutResourceManager(); + Map operatorSnapshot = DeploymentUtils.depSnapshot(baseBundle.getNamespace(), baseBundle.getDeploymentName()); + String dsProjectName = "test-notebooks-upgrade"; String ntbName = "test-odh-notebook"; String ntbNamespace = "test-odh-notebook-upgrade"; @@ -138,6 +147,17 @@ void testUpgradeBundle() throws IOException { upgradeBundle = new BundleInstall(Environment.INSTALL_FILE_PATH); upgradeBundle.createWithoutResourceManager(); - PodUtils.waitForPodsReady(ntbNamespace, lblSelector, 1, true, () -> { }); + DeploymentUtils.waitTillDepHasRolled(baseBundle.getNamespace(), baseBundle.getDeploymentName(), operatorSnapshot); + + LabelSelector labelSelector = ResourceManager.getClient().getDeployment(TestConstants.ODH_NAMESPACE, OdhConstants.ODH_DASHBOARD).getSpec().getSelector(); + PodUtils.verifyThatPodsAreStable(TestConstants.ODH_NAMESPACE, labelSelector); + + // Check that operator doesn't contain errors in logs + String operatorLog = ResourceManager.getClient().getClient().apps().deployments() + .inNamespace(baseBundle.getNamespace()).withName(baseBundle.getDeploymentName()).getLog(); + + assertThat(operatorLog, not(containsString("error"))); + assertThat(operatorLog, not(containsString("Error"))); + assertThat(operatorLog, not(containsString("ERROR"))); } }