Search in sources :

Example 1 with JobProcessesUpdate

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

the class JobManagementSpringResourceTest method testSetJobProcesses.

@Test
public void testSetJobProcesses() throws Exception {
    ServiceJobSpec.ServiceJobProcesses restRequest = ServiceJobSpec.ServiceJobProcesses.newBuilder().setDisableDecreaseDesired(true).setDisableIncreaseDesired(true).build();
    JobProcessesUpdate forwardedRequest = JobProcessesUpdate.newBuilder().setJobId(JOB_ID_1).setServiceJobProcesses(restRequest).build();
    when(jobServiceGatewayMock.updateJobProcesses(forwardedRequest, JUNIT_REST_CALL_METADATA)).thenReturn(Completable.complete());
    SpringMockMvcUtil.doPut(mockMvc, String.format("/api/v3/jobs/%s/jobprocesses", JOB_ID_1), restRequest);
    verify(jobServiceGatewayMock, times(1)).updateJobProcesses(forwardedRequest, JUNIT_REST_CALL_METADATA);
}
Also used : ServiceJobSpec(com.netflix.titus.grpc.protogen.ServiceJobSpec) JobProcessesUpdate(com.netflix.titus.grpc.protogen.JobProcessesUpdate) WebMvcTest(org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest) Test(org.junit.Test)

Aggregations

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