Search in sources :

Example 1 with TestRequest

use of io.helidon.webserver.testsupport.TestRequest in project helidon by oracle.

the class PrometheusSupportTest method doTestRequest.

private TestResponse doTestRequest(String nameQuery) throws Exception {
    TestRequest request = TestClient.create(routing).path("/metrics");
    if (nameQuery != null && !nameQuery.isEmpty()) {
        request.queryParameter("name[]", nameQuery);
    }
    TestResponse response = request.get();
    assertThat(response.status(), is(Http.Status.OK_200));
    return response;
}
Also used : TestResponse(io.helidon.webserver.testsupport.TestResponse) TestRequest(io.helidon.webserver.testsupport.TestRequest)

Aggregations

TestRequest (io.helidon.webserver.testsupport.TestRequest)1 TestResponse (io.helidon.webserver.testsupport.TestResponse)1