use of io.micronaut.http.client.exceptions.HttpClientException in project micronaut-core by micronaut-projects.
the class GoogleAuthFilterSpec method testApplyGoogleAuthFilter.
@Test
void testApplyGoogleAuthFilter() {
HttpClientException e = Assertions.assertThrows(HttpClientException.class, () -> client.toBlocking().exchange("/google-auth/api/test"));
String message = e.getMessage();
assertTrue(message.contains("metadata: nodename nor servname provided") || message.contains("metadata: Temporary failure in name resolution") || message.contains("metadata: Name or service not known") || message.contains("Connect Error: No such host is known (metadata)"));
}
Aggregations