Skip to content

Commit 93c62fa

Browse files
author
Corneil du Plessis
committed
Added a test for invalid name returning empty page on thinexecutions.
Fixes spring-attic#5989
1 parent 65b6b28 commit 93c62fa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionControllerTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,13 @@ void getAllThinExecutions() throws Exception {
342342
.andExpect(jsonPath("$._embedded.taskExecutionThinResourceList[*].taskExecutionStatus", containsInAnyOrder("RUNNING", "RUNNING","RUNNING","RUNNING")))
343343
.andExpect(jsonPath("$._embedded.taskExecutionThinResourceList", hasSize(4)));
344344
}
345+
@Test
346+
void getThinExecutionsByName() throws Exception {
347+
mockMvc.perform(get("/tasks/thinexecutions").queryParam("name", "nope").accept(MediaType.APPLICATION_JSON))
348+
.andDo(print())
349+
.andExpect(status().isOk())
350+
.andExpect(jsonPath("$.page.totalElements", is(0)));
351+
}
345352

346353
@Test
347354
void getCurrentExecutions() throws Exception {

0 commit comments

Comments
 (0)