use of org.openkilda.northbound.dto.v2.yflows.YFlowCreatePayload in project open-kilda by telstra.
the class YFlowControllerV2Test method shouldPassCreateRequestWhenPayloadIsValid.
@Test
@WithMockUser(username = TestConfig.USERNAME, password = TestConfig.PASSWORD, roles = TestConfig.ROLE)
public void shouldPassCreateRequestWhenPayloadIsValid() throws Exception {
YFlowCreatePayload payload = buildTestYFlowCreatePayload().build();
String body = objectMapper.writeValueAsString(payload);
mvc.perform(post("/y-flows").contentType("application/json").header("correlation_id", "test").content(body)).andExpect(status().isOk());
}
use of org.openkilda.northbound.dto.v2.yflows.YFlowCreatePayload in project open-kilda by telstra.
the class YFlowControllerV2Test method shouldReturnsStatus400WhenPathComputationStrategyNull.
@Ignore
@Test
@WithMockUser(username = TestConfig.USERNAME, password = TestConfig.PASSWORD, roles = TestConfig.ROLE)
public void shouldReturnsStatus400WhenPathComputationStrategyNull() throws Exception {
YFlowCreatePayload payload = buildTestYFlowCreatePayload().pathComputationStrategy(null).build();
String body = objectMapper.writeValueAsString(payload);
mvc.perform(post("/y-flows").contentType("application/json").header("correlation_id", "test").content(body)).andExpect(status().isBadRequest());
}
use of org.openkilda.northbound.dto.v2.yflows.YFlowCreatePayload in project open-kilda by telstra.
the class YFlowControllerV2Test method shouldReturnsStatus400WhenEncapsulationTypeNull.
@Ignore
@Test
@WithMockUser(username = TestConfig.USERNAME, password = TestConfig.PASSWORD, roles = TestConfig.ROLE)
public void shouldReturnsStatus400WhenEncapsulationTypeNull() throws Exception {
YFlowCreatePayload payload = buildTestYFlowCreatePayload().encapsulationType(null).build();
String body = objectMapper.writeValueAsString(payload);
mvc.perform(post("/y-flows").contentType("application/json").header("correlation_id", "test").content(body)).andExpect(status().isBadRequest());
}
Aggregations