Search in sources :

Example 16 with RsWithStatus

use of com.artipie.http.rs.RsWithStatus in project artipie by artipie.

the class ResponseMetricsSliceTest method shouldReportNotFoundResponse.

@Test
public void shouldReportNotFoundResponse() {
    this.send(RqMethod.HEAD, new RsWithStatus(RsStatus.NOT_FOUND));
    this.send(RqMethod.HEAD, new RsWithStatus(RsStatus.NOT_FOUND));
    MatcherAssert.assertThat(this.metrics.counter("head.error").value(), new IsEqual<>(2L));
}
Also used : RsWithStatus(com.artipie.http.rs.RsWithStatus) Test(org.junit.jupiter.api.Test)

Aggregations

RsWithStatus (com.artipie.http.rs.RsWithStatus)16 Test (org.junit.jupiter.api.Test)12 RsHasStatus (com.artipie.http.hm.RsHasStatus)8 RsStatus (com.artipie.http.rs.RsStatus)7 Response (com.artipie.http.Response)6 Slice (com.artipie.http.Slice)5 RequestLine (com.artipie.http.rq.RequestLine)5 SliceSimple (com.artipie.http.slice.SliceSimple)5 Map (java.util.Map)5 BasicAuthSlice (com.artipie.http.auth.BasicAuthSlice)4 Permission (com.artipie.http.auth.Permission)4 Authorization (com.artipie.http.headers.Authorization)4 AsyncResponse (com.artipie.http.async.AsyncResponse)3 ListOf (org.cactoos.list.ListOf)3 Base64Encoded (org.cactoos.text.Base64Encoded)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 Content (com.artipie.asto.Content)2 Key (com.artipie.asto.Key)2 Storage (com.artipie.asto.Storage)2 PublisherAs (com.artipie.asto.ext.PublisherAs)2