Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update codebase related to new CRD generated classes #137

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/main/java/io/odh/test/utils/DscUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ public static DSCInitialization getBasicDSCI() {
.withNewSpec()
.withApplicationsNamespace(OdhConstants.CONTROLLERS_NAMESPACE)
.withNewMonitoring()
.withManagementState(Monitoring.ManagementState.MANAGED)
.withManagementState(Monitoring.ManagementState.Managed)
.withNamespace(OdhConstants.MONITORING_NAMESPACE)
.endMonitoring()
.withNewServiceMesh()
.withManagementState(ServiceMesh.ManagementState.MANAGED)
.withManagementState(ServiceMesh.ManagementState.Managed)
.withNewControlPlane()
.withName(ServiceMeshOperator.SERVICE_MESH_NAME)
.withNamespace(ServiceMeshOperator.SERVICE_MESH_NAMESPACE)
.withMetricsCollection(ControlPlane.MetricsCollection.ISTIO)
.withMetricsCollection(ControlPlane.MetricsCollection.Istio)
.endControlPlane()
.endServiceMesh()
.withNewTrustedCABundle()
.withManagementState(TrustedCABundle.ManagementState.REMOVED)
.withManagementState(TrustedCABundle.ManagementState.Removed)
.endTrustedCABundle()
.endSpec()
.build();
Expand All @@ -69,28 +69,28 @@ public static DataScienceCluster getBasicDSC(String dsProjectName) {
.withComponents(
new ComponentsBuilder()
.withWorkbenches(
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.MANAGED).build()
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.Managed).build()
)
.withDashboard(
new DashboardBuilder().withManagementState(Dashboard.ManagementState.MANAGED).build()
new DashboardBuilder().withManagementState(Dashboard.ManagementState.Managed).build()
)
.withKserve(
new KserveBuilder().withManagementState(Kserve.ManagementState.MANAGED).build()
new KserveBuilder().withManagementState(Kserve.ManagementState.Managed).build()
)
.withKueue(
new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build()
new KueueBuilder().withManagementState(Kueue.ManagementState.Managed).build()
)
.withCodeflare(
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build()
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.Managed).build()
)
.withDatasciencepipelines(
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.MANAGED).build()
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.Managed).build()
)
.withModelmeshserving(
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.MANAGED).build()
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.Managed).build()
)
.withRay(
new RayBuilder().withManagementState(Ray.ManagementState.MANAGED).build()
new RayBuilder().withManagementState(Ray.ManagementState.Managed).build()
)
.build())
.endSpec()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ void init() {
void checkDataScienceClusterExists() {
DataScienceCluster cluster = dataScienceProjectCli.inNamespace(OdhConstants.CONTROLLERS_NAMESPACE).withName(DS_CLUSTER_NAME).get();

assertEquals(Kserve.ManagementState.MANAGED, cluster.getSpec().getComponents().getKserve().getManagementState());
assertEquals(Codeflare.ManagementState.MANAGED, cluster.getSpec().getComponents().getCodeflare().getManagementState());
assertEquals(Dashboard.ManagementState.MANAGED, cluster.getSpec().getComponents().getDashboard().getManagementState());
assertEquals(Ray.ManagementState.MANAGED, cluster.getSpec().getComponents().getRay().getManagementState());
assertEquals(Modelmeshserving.ManagementState.MANAGED, cluster.getSpec().getComponents().getModelmeshserving().getManagementState());
assertEquals(Datasciencepipelines.ManagementState.MANAGED, cluster.getSpec().getComponents().getDatasciencepipelines().getManagementState());
assertEquals(Kserve.ManagementState.Managed, cluster.getSpec().getComponents().getKserve().getManagementState());
assertEquals(Codeflare.ManagementState.Managed, cluster.getSpec().getComponents().getCodeflare().getManagementState());
assertEquals(Dashboard.ManagementState.Managed, cluster.getSpec().getComponents().getDashboard().getManagementState());
assertEquals(Ray.ManagementState.Managed, cluster.getSpec().getComponents().getRay().getManagementState());
assertEquals(Modelmeshserving.ManagementState.Managed, cluster.getSpec().getComponents().getModelmeshserving().getManagementState());
assertEquals(Datasciencepipelines.ManagementState.Managed, cluster.getSpec().getComponents().getDatasciencepipelines().getManagementState());
if (!Environment.PRODUCT.equals(Environment.PRODUCT_ODH)
&& Environment.OPERATOR_INSTALL_TYPE.equalsIgnoreCase(InstallTypes.OLM.toString())
&& Objects.requireNonNull(CsvUtils.getOperatorVersionFromCsv()).equals("2.7.0")) {
// https://issues.redhat.com/browse/RHOAIENG-3234 Remove Kueue from RHOAI 2.7
assertNull(cluster.getSpec().getComponents().getKueue());
} else {
assertEquals(Kueue.ManagementState.MANAGED, cluster.getSpec().getComponents().getKueue().getManagementState());
assertEquals(Kueue.ManagementState.Managed, cluster.getSpec().getComponents().getKueue().getManagementState());
}
assertEquals(Workbenches.ManagementState.MANAGED, cluster.getSpec().getComponents().getWorkbenches().getManagementState());
assertEquals(Workbenches.ManagementState.Managed, cluster.getSpec().getComponents().getWorkbenches().getManagementState());
}

@Test
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/io/odh/test/e2e/standard/DataScienceClusterST.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,20 @@ void createDataScienceCluster() {

DataScienceCluster cluster = DataScienceClusterResource.dataScienceCLusterClient().withName(DS_PROJECT_NAME).get();

assertEquals(Kserve.ManagementState.MANAGED, cluster.getSpec().getComponents().getKserve().getManagementState());
assertEquals(Codeflare.ManagementState.MANAGED, cluster.getSpec().getComponents().getCodeflare().getManagementState());
assertEquals(Dashboard.ManagementState.MANAGED, cluster.getSpec().getComponents().getDashboard().getManagementState());
assertEquals(Datasciencepipelines.ManagementState.MANAGED, cluster.getSpec().getComponents().getDatasciencepipelines().getManagementState());
assertEquals(Workbenches.ManagementState.MANAGED, cluster.getSpec().getComponents().getWorkbenches().getManagementState());
assertEquals(Modelmeshserving.ManagementState.MANAGED, cluster.getSpec().getComponents().getModelmeshserving().getManagementState());
assertEquals(Ray.ManagementState.MANAGED, cluster.getSpec().getComponents().getRay().getManagementState());
assertEquals(Kserve.ManagementState.Managed, cluster.getSpec().getComponents().getKserve().getManagementState());
assertEquals(Codeflare.ManagementState.Managed, cluster.getSpec().getComponents().getCodeflare().getManagementState());
assertEquals(Dashboard.ManagementState.Managed, cluster.getSpec().getComponents().getDashboard().getManagementState());
assertEquals(Datasciencepipelines.ManagementState.Managed, cluster.getSpec().getComponents().getDatasciencepipelines().getManagementState());
assertEquals(Workbenches.ManagementState.Managed, cluster.getSpec().getComponents().getWorkbenches().getManagementState());
assertEquals(Modelmeshserving.ManagementState.Managed, cluster.getSpec().getComponents().getModelmeshserving().getManagementState());
assertEquals(Ray.ManagementState.Managed, cluster.getSpec().getComponents().getRay().getManagementState());
if (!Environment.PRODUCT.equals(Environment.PRODUCT_ODH)
&& Environment.OPERATOR_INSTALL_TYPE.equalsIgnoreCase(InstallTypes.OLM.toString())
&& Objects.requireNonNull(CsvUtils.getOperatorVersionFromCsv()).equals("2.7.0")) {
// https://issues.redhat.com/browse/RHOAIENG-3234 Remove Kueue from RHOAI 2.7
assertNull(cluster.getSpec().getComponents().getKueue());
} else {
assertEquals(Kueue.ManagementState.MANAGED, cluster.getSpec().getComponents().getKueue().getManagementState());
assertEquals(Kueue.ManagementState.Managed, cluster.getSpec().getComponents().getKueue().getManagementState());
}
}
}
16 changes: 8 additions & 8 deletions src/test/java/io/odh/test/e2e/standard/NotebookST.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,28 +142,28 @@ void deployDataScienceCluster() {
.withComponents(
new ComponentsBuilder()
.withWorkbenches(
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.MANAGED).build()
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.Managed).build()
)
.withDashboard(
new DashboardBuilder().withManagementState(Dashboard.ManagementState.MANAGED).build()
new DashboardBuilder().withManagementState(Dashboard.ManagementState.Managed).build()
)
.withKserve(
new KserveBuilder().withManagementState(Kserve.ManagementState.MANAGED).build()
new KserveBuilder().withManagementState(Kserve.ManagementState.Managed).build()
)
.withKueue(
new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build()
new KueueBuilder().withManagementState(Kueue.ManagementState.Managed).build()
)
.withCodeflare(
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build()
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.Managed).build()
)
.withDatasciencepipelines(
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.MANAGED).build()
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.Managed).build()
)
.withModelmeshserving(
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.MANAGED).build()
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.Managed).build()
)
.withRay(
new RayBuilder().withManagementState(Ray.ManagementState.MANAGED).build()
new RayBuilder().withManagementState(Ray.ManagementState.Managed).build()
)
.build())
.endSpec()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void testUserCanCreateRunAndDeleteADSPipelineFromDSProject() throws IOException
.withEnableSamplePipeline(false)
.withInjectDefaultScript(true)
.withStripEOF(true)
.withTerminateStatus(ApiServer.TerminateStatus.CANCELLED)
.withTerminateStatus(ApiServer.TerminateStatus.Cancelled)
.withTrackArtifacts(true)
.endApiServer()
.withNewDatabase()
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/io/odh/test/e2e/standard/PipelineV2ServerST.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,24 @@ void deployDataScienceCluster() {
.withComponents(
new ComponentsBuilder()
.withWorkbenches(
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.MANAGED).build()
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.Managed).build()
)
.withDashboard(
new DashboardBuilder().withManagementState(Dashboard.ManagementState.MANAGED).build()
new DashboardBuilder().withManagementState(Dashboard.ManagementState.Managed).build()
)
.withKserve(
new KserveBuilder().withManagementState(Kserve.ManagementState.MANAGED).build()
new KserveBuilder().withManagementState(Kserve.ManagementState.Managed).build()
)
.withKueue(
new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build()
new KueueBuilder().withManagementState(Kueue.ManagementState.Managed).build()
)
.withCodeflare(
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build()
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.Managed).build()
)
// TODO(jdanek): remove devFlags prior to release, when KFPv2 is the default
.withDatasciencepipelines(
new DatasciencepipelinesBuilder()
.withManagementState(Datasciencepipelines.ManagementState.MANAGED)
.withManagementState(Datasciencepipelines.ManagementState.Managed)
// https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/datasciencecluster/datasciencecluster.yaml
.withDevFlags(
new DevFlagsBuilder()
Expand All @@ -144,10 +144,10 @@ void deployDataScienceCluster() {
.build()
)
.withModelmeshserving(
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.MANAGED).build()
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.Managed).build()
)
.withRay(
new RayBuilder().withManagementState(Ray.ManagementState.MANAGED).build()
new RayBuilder().withManagementState(Ray.ManagementState.Managed).build()
)
.build())
.endSpec()
Expand Down Expand Up @@ -235,7 +235,7 @@ void testUserCanOperateDSv2PipelineFromDSProject() throws IOException {
.withEnableSamplePipeline(false)
.withInjectDefaultScript(true)
.withStripEOF(true)
.withTerminateStatus(ApiServer.TerminateStatus.CANCELLED)
.withTerminateStatus(ApiServer.TerminateStatus.Cancelled)
.withTrackArtifacts(true)
.endApiServer()
.withNewDatabase()
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@ protected void deployDsc(String name) {
.withComponents(
new ComponentsBuilder()
.withWorkbenches(
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.MANAGED).build()
new WorkbenchesBuilder().withManagementState(Workbenches.ManagementState.Managed).build()
)
.withDashboard(
new DashboardBuilder().withManagementState(Dashboard.ManagementState.MANAGED).build()
new DashboardBuilder().withManagementState(Dashboard.ManagementState.Managed).build()
)
.withKserve(
new KserveBuilder().withManagementState(Kserve.ManagementState.REMOVED).build()
new KserveBuilder().withManagementState(Kserve.ManagementState.Removed).build()
)
.withKueue(
new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build()
new KueueBuilder().withManagementState(Kueue.ManagementState.Managed).build()
)
.withCodeflare(
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build()
new CodeflareBuilder().withManagementState(Codeflare.ManagementState.Managed).build()
)
.withDatasciencepipelines(
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.MANAGED).build()
new DatasciencepipelinesBuilder().withManagementState(Datasciencepipelines.ManagementState.Managed).build()
)
.withModelmeshserving(
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.MANAGED).build()
new ModelmeshservingBuilder().withManagementState(Modelmeshserving.ManagementState.Managed).build()
)
.withRay(
new RayBuilder().withManagementState(Ray.ManagementState.MANAGED).build()
new RayBuilder().withManagementState(Ray.ManagementState.Managed).build()
)
.build())
.endSpec()
Expand Down
Loading
Loading