Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Mar 20, 2024
1 parent 6b5bced commit bbce16e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/test/java/io/odh/test/e2e/standard/PipelineV2ServerST.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,7 @@ void testUserCanOperateDSv2PipelineFromDSProject() throws IOException {
KFPv2Client kfpClient = new KFPv2Client("http://localhost:%d".formatted(portForward.getLocalPort()));

// WORKAROUND(RHOAIENG-3250): delete sample pipeline present on ODH
if (Environment.PRODUCT.equals(Environment.PRODUCT_ODH)) {
for (KFPv2Client.Pipeline pipeline : kfpClient.listPipelines()) {
kfpClient.deletePipeline(pipeline.pipelineId);
}
}

for (KFPv2Client.Pipeline pipeline : kfpClient.listPipelines()) {
for (KFPv2Client.PipelineVersion pipelineVersion : kfpClient.listPipelineVersions(pipeline.pipelineId)) {
kfpClient.deletePipelineVersion(pipeline.pipelineId, pipelineVersion.pipelineVersionId);
}
kfpClient.deletePipeline(pipeline.pipelineId);
}
deletePreexistingPipelinesAndVersions(kfpClient);

KFPv2Client.Pipeline importedPipeline = kfpClient.importPipeline(pipelineTestName, pipelineTestDesc, pipelineTestFilepath);

Expand Down Expand Up @@ -342,6 +331,16 @@ void testUserCanOperateDSv2PipelineFromDSProject() throws IOException {
}
}

@io.qameta.allure.Step
private static void deletePreexistingPipelinesAndVersions(KFPv2Client kfpClient) {
for (KFPv2Client.Pipeline pipeline : kfpClient.listPipelines()) {
for (KFPv2Client.PipelineVersion pipelineVersion : kfpClient.listPipelineVersions(pipeline.pipelineId)) {
kfpClient.deletePipelineVersion(pipeline.pipelineId, pipelineVersion.pipelineVersionId);
}
kfpClient.deletePipeline(pipeline.pipelineId);
}
}

@io.qameta.allure.Step
private void checkPipelineRunK8sDeployments(String prjTitle, String runId) {
List<Pod> argoTaskPods = client.pods().inNamespace(prjTitle).withLabel("pipeline/runid=" + runId).list().getItems();
Expand Down

0 comments on commit bbce16e

Please sign in to comment.