use of com.bakdata.quick.manager.k8s.middleware.MiddlewareList in project quick by bakdata.
the class KubernetesGatewayServiceTest method shouldCreateMiddleware.
@Test
void shouldCreateMiddleware() {
this.createGateway(GATEWAY_NAME, 1, null);
final MiddlewareList middlewares = this.getMiddlewares();
assertThat(middlewares.getItems()).hasSize(1).first().satisfies(middleware -> {
assertThat(middleware.getMetadata().getName()).isEqualTo(DEPLOYMENT_NAME);
assertThat(middleware.getSpec().getStripPrefix()).isNotNull();
assertThat(middleware.getSpec().getStripPrefix().getPrefixes()).containsExactly("/gateway/" + GATEWAY_NAME);
});
}
Aggregations