Skip to content

Commit

Permalink
[CALCITE-6280] Implemented review comment - Moved the test to another…
Browse files Browse the repository at this point in the history
… class.

Change-Id: I1e0f1092a91e6a23a0f1c7eea92874553285ef0b
  • Loading branch information
vaijosh committed Feb 26, 2024
1 parent 6d0b234 commit 7a7062b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

/**
Expand Down Expand Up @@ -186,6 +187,14 @@ private static void setupUsers(File keytabDir) throws KrbException {
assertEquals(401, conn.getResponseCode());
}

@Test public void testServerVersionNotReturnedForUnauthorisedAccess() throws Exception {
LOG.info("Connecting to {}", httpServerUrl.toString());
HttpURLConnection conn = (HttpURLConnection) httpServerUrl.openConnection();
conn.setRequestMethod("GET");
assertEquals("Unauthorized response status code", 401,conn.getResponseCode());
assertNull("Server information was not expected", conn.getHeaderField("server"));
}

@Test public void testAuthenticatedClientsAllowed() throws Exception {
// Create the subject for the client
final Subject clientSubject = AvaticaJaasKrbUtil.loginUsingKeytab(
Expand Down

This file was deleted.

0 comments on commit 7a7062b

Please sign in to comment.