Search in sources :

Example 1 with JobAttributesUpdate

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

the class JobManagementSpringResourceTest method testUpdateJobAttributes.

@Test
public void testUpdateJobAttributes() throws Exception {
    JobAttributesUpdate restRequest = JobAttributesUpdate.newBuilder().setJobId(JOB_ID_1).putAttributes("keyA", "valueA").build();
    when(jobServiceGatewayMock.updateJobAttributes(restRequest, JUNIT_REST_CALL_METADATA)).thenReturn(Mono.empty());
    SpringMockMvcUtil.doPut(mockMvc, String.format("/api/v3/jobs/%s/attributes", JOB_ID_1), restRequest);
    verify(jobServiceGatewayMock, times(1)).updateJobAttributes(restRequest, JUNIT_REST_CALL_METADATA);
}
Also used : JobAttributesUpdate(com.netflix.titus.grpc.protogen.JobAttributesUpdate) WebMvcTest(org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest) Test(org.junit.Test)

Aggregations

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