10000 test: unauth. sanity check return 200 · is00hcw/elasticsearch-http-basic@0fe17c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fe17c5

Browse files
author
emiguez
committed
test: unauth. sanity check return 200
Missing case. Desired behavoir when an unauth. sanity check is returning 200 (OK) close #41
1 parent 8650288 commit 0fe17c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/java/com/asquera/elasticsearch/plugins/http/auth/integration/EmptyWhitelistIntegrationTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,11 @@ public void clientBadCredentialsBasicAuthenticationFails() throws Exception {
6262
assertThat(response.getStatusCode()
6363
, equalTo(RestStatus.UNAUTHORIZED.getStatus()));
6464
}
65+
66+
@Test
67+
public void clientBadCredentialsSanityCheckOk() throws Exception {
68+
HttpResponse response = requestWithCredentials("admin:wrong").path("/").execute();
69+
assertThat(response.getStatusCode()
70+
, equalTo(RestStatus.OK.getStatus()));
71+
}
6572
}

0 commit comments

Comments
 (0)
0