use of zipkin2.CheckResult in project zipkin by openzipkin.
the class ElasticsearchStorageTest method check_fail_onNoContent.
// makes sure we don't NPE
@Test
void check_fail_onNoContent() {
// assume index templates called before
storage.ensuredTemplates = true;
// empty instead of success response
server.enqueue(SUCCESS_RESPONSE);
CheckResult result = storage.check();
assertThat(result.ok()).isFalse();
assertThat(result.error().getMessage()).isEqualTo("No content reading Elasticsearch version");
}
use of zipkin2.CheckResult in project zipkin by openzipkin.
the class ElasticsearchStorageTest method check_unauthorized.
// TODO: when Armeria's mock server supports it, add a test for IOException
@Test
void check_unauthorized() {
server.enqueue(RESPONSE_UNAUTHORIZED);
CheckResult result = storage.check();
assertThat(result.ok()).isFalse();
assertThat(result.error().getMessage()).isEqualTo("User: anonymous is not authorized to perform: es:ESHttpGet");
}
Aggregations