Skip to content

Commit

Permalink
control-service:better cleanup after test completes
Browse files Browse the repository at this point in the history
Signed-off-by: mrMoZ1 <[email protected]>
  • Loading branch information
mrMoZ1 committed May 23, 2023
1 parent 9e42fdf commit 0d42355
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,7 @@ public void testDeployment() throws Exception {
}

@AfterEach
public void cleanUp() throws Exception {
mockMvc
.perform(
delete(
String.format(
"/data-jobs/for-team/%s/jobs/%s/sources", TEST_TEAM_NAME, TEST_JOB_NAME))
.with(user("user")))
.andExpect(status().isOk());
public void deleteImage() {

// delete repository and images
DeleteRepositoryRequest request =
Expand All @@ -224,4 +217,15 @@ public void cleanUp() throws Exception {

ecrClient.deleteRepository(request);
}

@AfterEach
public void deleteDataJob() throws Exception {
mockMvc
.perform(
delete(
String.format(
"/data-jobs/for-team/%s/jobs/%s", TEST_TEAM_NAME, TEST_JOB_NAME))
.with(user("user")))
.andExpect(status().isOk());
}
}

0 comments on commit 0d42355

Please sign in to comment.