Skip to content

Commit

Permalink
Adapt trash run tests to the new status codes
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
  • Loading branch information
lampajr committed Dec 5, 2024
1 parent 0fb4f11 commit 41c1fa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private int uploadRun(int testId, String owner, JsonNode runData) {
Run run = createSampleRun(testId, runData, owner);

try (Response resp = runService.add(String.valueOf(testId), owner, Access.PUBLIC, run)) {
assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
assertEquals(Response.Status.ACCEPTED.getStatusCode(), resp.getStatus());
return Integer.parseInt(resp.getEntity().toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ void testDeleteTestWithRun() {
Run run1 = createSampleRun(created1.id, JsonNodeFactory.instance.objectNode(), FOO_TEAM);
int runId;
try (Response resp = runService.add(created1.name, FOO_TEAM, Access.PUBLIC, run1)) {
assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
assertEquals(Response.Status.ACCEPTED.getStatusCode(), resp.getStatus());
runId = Integer.parseInt(resp.getEntity().toString());
}
assertEquals(1, RunDAO.count());
Expand Down Expand Up @@ -546,7 +546,7 @@ void testDeleteTestWithAlreadyTrashedRun() {
Run run1 = createSampleRun(created1.id, JsonNodeFactory.instance.objectNode(), FOO_TEAM);
int runId;
try (Response resp = runService.add(created1.name, FOO_TEAM, Access.PUBLIC, run1)) {
assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus());
assertEquals(Response.Status.ACCEPTED.getStatusCode(), resp.getStatus());
runId = Integer.parseInt(resp.getEntity().toString());
}
assertEquals(1, RunDAO.count());
Expand Down

0 comments on commit 41c1fa5

Please sign in to comment.