Search in sources :

Example 1 with TaskAttributesUpdate

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

the class JobManagementSpringResourceTest method testUpdateTaskAttributes.

@Test
public void testUpdateTaskAttributes() throws Exception {
    TaskAttributesUpdate restRequest = TaskAttributesUpdate.newBuilder().setTaskId(TASK_ID_1).putAttributes("keyA", "valueA").build();
    when(jobServiceGatewayMock.updateTaskAttributes(restRequest, JUNIT_REST_CALL_METADATA)).thenReturn(Completable.complete());
    SpringMockMvcUtil.doPut(mockMvc, String.format("/api/v3/tasks/%s/attributes", TASK_ID_1), restRequest);
    verify(jobServiceGatewayMock, times(1)).updateTaskAttributes(restRequest, JUNIT_REST_CALL_METADATA);
}
Also used : TaskAttributesUpdate(com.netflix.titus.grpc.protogen.TaskAttributesUpdate) WebMvcTest(org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest) Test(org.junit.Test)

Aggregations

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