Skip to content

Commit

Permalink
[Improve][RestAPI] add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Mar 6, 2024
1 parent 0729bbf commit 81c2f33
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,40 @@ public void testGetRunningJobById() {
});
}

@Test
public void testGetAnNotExistJobById() {
Arrays.asList(node2, node1)
.forEach(
instance -> {
given().get(
HOST
+ instance.getCluster()
.getLocalMember()
.getAddress()
.getPort()
+ RestConstant.RUNNING_JOB_URL
+ "/"
+ 123)
.then()
.statusCode(200)
.body("jobId", equalTo("123"));
});
Arrays.asList(node2, node1)
.forEach(
instance -> {
given().get(
HOST
+ instance.getCluster()
.getLocalMember()
.getAddress()
.getPort()
+ RestConstant.RUNNING_JOB_URL
+ "/")
.then()
.statusCode(500);
});
}

@Test
public void testGetRunningJobs() {
Arrays.asList(node2, node1)
Expand Down

0 comments on commit 81c2f33

Please sign in to comment.