Search in sources :

Example 1 with MiddlewareList

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);
    });
}
Also used : MiddlewareList(com.bakdata.quick.manager.k8s.middleware.MiddlewareList) KubernetesTest(com.bakdata.quick.manager.k8s.KubernetesTest) Test(org.junit.jupiter.api.Test)

Aggregations

KubernetesTest (com.bakdata.quick.manager.k8s.KubernetesTest)1 MiddlewareList (com.bakdata.quick.manager.k8s.middleware.MiddlewareList)1 Test (org.junit.jupiter.api.Test)1