add test to make sure HttpGetter ignores invalid certificates

This commit is contained in:
Athou
2024-07-29 09:16:44 +02:00
parent 159c2c01a7
commit 1b1d3c791b
2 changed files with 25 additions and 0 deletions

View File

@@ -197,4 +197,12 @@ class HttpGetterTest {
Assertions.assertEquals("Response size exceeds the maximum allowed size (10000 bytes)", e.getMessage());
}
@Test
void ignoreInvalidSsl() throws Exception {
this.mockServerClient.when(HttpRequest.request().withMethod("GET")).respond(HttpResponse.response().withBody("ok"));
HttpResult result = getter.getBinary("https://localhost:" + this.mockServerClient.getPort(), TIMEOUT);
Assertions.assertEquals("ok", new String(result.getContent()));
}
}