Search in sources :

Example 1 with TaskMoveRequest

use of com.netflix.titus.grpc.protogen.TaskMoveRequest in project titus-control-plane by Netflix.

the class JobManagementSpringResourceTest method testMoveTask.

@Test
public void testMoveTask() throws Exception {
    TaskMoveRequest request = TaskMoveRequest.newBuilder().setSourceJobId(JOB_ID_1).setTargetJobId(JOB_2.getId()).setTaskId(TASK_ID_1).build();
    when(jobServiceGatewayMock.moveTask(request, JUNIT_REST_CALL_METADATA)).thenReturn(Completable.complete());
    SpringMockMvcUtil.doPost(mockMvc, "/api/v3/tasks/move", request);
    verify(jobServiceGatewayMock, times(1)).moveTask(request, JUNIT_REST_CALL_METADATA);
}
Also used : TaskMoveRequest(com.netflix.titus.grpc.protogen.TaskMoveRequest) WebMvcTest(org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest) Test(org.junit.Test)

Aggregations

TaskMoveRequest (com.netflix.titus.grpc.protogen.TaskMoveRequest)1 Test (org.junit.Test)1 WebMvcTest (org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest)1