commit | 59daaf1d257d6a2d0aec7841e54213977baf46b2 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Mon Apr 26 22:29:25 2021 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Mon Apr 26 21:40:54 2021 +0000 |
tree | 85fdc13e01cb65a92c634eaaaf9f75fc6a687acb | |
parent | d5beedea79d2cf812aa7e74d507d4f4aa6091de0 [diff] |
Add test for setups without AnonymousRead Make sure that healthcheck works also for setups where the anonymous read is blocked. Change-Id: I1fbb0d3341164c7c710325cbd4e1cde3859dc3f5
diff --git a/src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java b/src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java index d14153f..ae3f51d 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java +++ b/src/test/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckIT.java
@@ -70,6 +70,12 @@ } @Test + public void shouldReturnOkWhenHealthyAndAnonymousReadIsBlocked() throws Exception { + blockAnonymousRead(); + getHealthCheckStatus().assertOK(); + } + + @Test public void shouldReturnAJsonPayload() throws Exception { assertThat(getHealthCheckStatus().getHeader(CONTENT_TYPE)).contains("application/json"); }