Skip to content

Commit

Permalink
update test expectations in SizeLimitHandlerTest
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Aug 18, 2023
1 parent 0c4f879 commit 325d839
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
_local.getResponse("GET /ctx/hello HTTP/1.0\r\n\r\n"));
assertThat(response.getStatus(), equalTo(500));
assertThat(response.getContent(), containsString("8193&gt;8192"));
assertThat(response.getContent(), containsString("Response body is too large"));
}

@Test
Expand All @@ -130,6 +131,7 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
_local.getResponse("GET /ctx/hello HTTP/1.0\r\n\r\n"));
assertThat(response.getStatus(), equalTo(500));
assertThat(response.getContent(), containsString("8193&gt;8192"));
assertThat(response.getContent(), containsString("Response body is too large"));
}

@Test
Expand Down Expand Up @@ -219,6 +221,7 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
"\r\n" +
"123456..."));
assertThat(response.getStatus(), equalTo(413));
assertThat(response.getContent(), containsString("Request body is too large"));
assertThat(response.getContent(), containsString("32768&gt;8192"));
}

Expand Down Expand Up @@ -253,7 +256,8 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques

HttpTester.Response response = HttpTester.parseResponse(endp.getResponse());

assertThat(response.getStatus(), equalTo(500));
assertThat(response.getStatus(), equalTo(413));
assertThat(response.getContent(), containsString("Request body is too large"));
assertThat(response.getContent(), containsString("&gt;8192"));
}
}
Expand Down

0 comments on commit 325d839

Please sign in to comment.