Skip to content

Commit

Permalink
Update DSCI monitoring namespace in tests (#77)
Browse files Browse the repository at this point in the history
Signed-off-by: David Kornel <[email protected]>
  • Loading branch information
kornys authored Jan 22, 2024
1 parent e40181f commit 72cafce
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/odh/test/OdhConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ private OdhConstants() { }
private static final String ODH_DASHBOARD_CONTROLLER = "odh-dashboard";

private static final String ODH_BUNDLE_OPERATOR_NAME = "opendatahub-operator-system";
private static final String ODH_MONITORING_NAMESPACE = "odh-monitoring";


// ODH OLM
private static final String ODH_OLM_OPERATOR_NAME = "opendatahub-operator";
Expand Down Expand Up @@ -49,6 +51,7 @@ private OdhConstants() { }
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";
private static final String RHOAI_MONITORING_NAMESPACE = "redhat-ods-monitoring";

// Public part
public static final String CODEFLARE_DEPLOYMENT_NAME = "codeflare-operator-manager";
Expand All @@ -67,6 +70,7 @@ private OdhConstants() { }
public static final String DASHBOARD_CONTROLLER = getOdhOrRhoai("DASHBOARD_CONTROLLER", ODH_DASHBOARD_CONTROLLER, RHOAI_DASHBOARD_CONTROLLER);
public static final String BUNDLE_OPERATOR_NAMESPACE = getOdhOrRhoai("BUNDLE_OPERATOR_NAMESPACE", ODH_BUNDLE_OPERATOR_NAME, RHOAI_OLM_OPERATOR_NAME);
public static final String DEFAULT_DSCI_NAME = getOdhOrRhoai("DSCI_NAME", ODH_DSCI_NAME, RHOAI_DSCI_NAME);
public static final String MONITORING_NAMESPACE = getOdhOrRhoai("MONITORING_NAMESPACE", ODH_MONITORING_NAMESPACE, RHOAI_MONITORING_NAMESPACE);
// OLM env variables
public static final String OLM_OPERATOR_NAME = getOdhOrRhoai("OLM_OPERATOR_NAME", ODH_OLM_OPERATOR_NAME, RHOAI_OLM_OPERATOR_NAME);
public static final String OLM_OPERATOR_NAMESPACE = getOdhOrRhoai("OLM_OPERATOR_NAMESPACE", ODH_OLM_OPERATOR_NAMESPACE, RHOAI_OLM_OPERATOR_NAMESPACE);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/odh/test/framework/logs/LogCollector.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static void saveKubernetesState(ExtensionContext extensionContext, Throwa
ResourceManager.addNamespaceForLogCollect(OdhConstants.BUNDLE_OPERATOR_NAMESPACE);
ResourceManager.addNamespaceForLogCollect(OdhConstants.OLM_OPERATOR_NAMESPACE);
ResourceManager.addNamespaceForLogCollect(OdhConstants.CONTROLLERS_NAMESPACE);
ResourceManager.addNamespaceForLogCollect(OdhConstants.MONITORING_NAMESPACE);
} catch (Exception ignored) {
LOGGER.warn("Cannot label namespaces for collect logs");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void createDataScienceCluster() {
.withApplicationsNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNewMonitoring()
.withManagementState(Monitoring.ManagementState.MANAGED)
.withNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNamespace(OdhConstants.MONITORING_NAMESPACE)
.endMonitoring()
.withNewServiceMesh()
.withManagementState(ServiceMesh.ManagementState.REMOVED)
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/odh/test/e2e/standard/NotebookST.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void deployDataScienceCluster() {
.withApplicationsNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNewMonitoring()
.withManagementState(Monitoring.ManagementState.MANAGED)
.withNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNamespace(OdhConstants.MONITORING_NAMESPACE)
.endMonitoring()
.withNewServiceMesh()
.withManagementState(ServiceMesh.ManagementState.REMOVED)
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected void deployDsc(String name) {
.withApplicationsNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNewMonitoring()
.withManagementState(Monitoring.ManagementState.MANAGED)
.withNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNamespace(OdhConstants.MONITORING_NAMESPACE)
.endMonitoring()
.withNewServiceMesh()
.withManagementState(ServiceMesh.ManagementState.REMOVED)
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/io/odh/test/unit/UnitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.server.mock.EnableKubernetesMockClient;
import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer;
import io.odh.test.OdhConstants;
import io.odh.test.TestSuite;
import io.odh.test.framework.ExtensionContextParameterResolver;
import io.odh.test.framework.listeners.TestVisualSeparator;
Expand Down Expand Up @@ -54,9 +55,9 @@ void testCreateDSCInitialization() {
.withName("default")
.endMetadata()
.withNewSpec()
.withApplicationsNamespace("opendatahub")
.withApplicationsNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNewMonitoring()
.withNamespace("odh")
.withNamespace(OdhConstants.MONITORING_NAMESPACE)
.withManagementState(Monitoring.ManagementState.MANAGED)
.endMonitoring()
.withNewServiceMesh()
Expand Down

0 comments on commit 72cafce

Please sign in to comment.