public class TestHttpServer extends HttpServerFunctionalTest
| Modifier and Type | Class and Description |
|---|---|
static class |
TestHttpServer.DummyFilterInitializer
FilterInitializer that initialized the DummyFilter.
|
static class |
TestHttpServer.DummyServletFilter
Dummy filter that mimics as an authentication filter.
|
static class |
TestHttpServer.EchoMapServlet |
static class |
TestHttpServer.EchoServlet |
static class |
TestHttpServer.HtmlContentServlet |
static class |
TestHttpServer.LongHeaderServlet |
static class |
TestHttpServer.MyGroupsProvider
Custom user->group mapping service.
|
| Modifier and Type | Field and Description |
|---|---|
private static URL |
baseUrl |
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
(package private) static int |
MAX_THREADS |
private static org.apache.hadoop.hbase.http.HttpServer |
server |
TEST_BUILD_WEBAPPS| Constructor and Description |
|---|
TestHttpServer() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.hadoop.hbase.http.HttpServer |
checkBindAddress(String host,
int port,
boolean findPort) |
static void |
cleanup() |
private static int |
getHttpStatusCode(String urlstring,
String userName)
Access a URL and get the corresponding return Http status code.
|
private static Map<String,Object> |
parse(String jsonString) |
static void |
setup() |
void |
testAuthorizationOfDefaultServlets()
Verify the administrator access for /logs, /stacks, /conf, /logLevel and
/metrics servlets.
|
void |
testBindAddress() |
void |
testContentTypes() |
void |
testDisabledAuthorizationOfDefaultServlets()
Verify the access for /logs, /stacks, /conf, /logLevel and /metrics
servlets, when authentication filters are set, but authorization is not
enabled.
|
void |
testEcho() |
void |
testEchoMap()
Test the echo map servlet that uses getParameterMap.
|
void |
testHasAdministratorAccess() |
void |
testHttpMethods() |
void |
testJersey() |
void |
testLongHeader()
Test that verifies headers can be up to 64K long.
|
void |
testMaxThreads()
Test the maximum number of threads cannot be exceeded.
|
void |
testNoCacheHeader() |
void |
testRequestQuoterWithNotNull() |
void |
testRequestQuoterWithNull() |
void |
testRequiresAuthorizationAccess() |
void |
testXFrameHeaderSameOrigin() |
access, createAndStartTestServer, createServer, createServer, createServer, createServer, createServer, createTestServer, createTestServer, createTestServer, createTestServer, createTestServerWithSecurity, createTestServerWithSecurityAndAcl, deleteRecursively, getFreePort, getServerURL, prepareTestWebapp, readOutput, stopassertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, failpublic static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static org.apache.hadoop.hbase.http.HttpServer server
static final int MAX_THREADS
public TestHttpServer()
public void testMaxThreads() throws Exception
Exceptionpublic void testEchoMap() throws Exception
Exceptionpublic void testLongHeader() throws Exception
Exceptionpublic void testContentTypes() throws Exception
Exceptionprivate static int getHttpStatusCode(String urlstring, String userName) throws IOException
urlstring - The url to accessuserName - The user to perform access asIOException - if there is a problem communicating with the serverpublic void testDisabledAuthorizationOfDefaultServlets() throws Exception
Exceptionpublic void testAuthorizationOfDefaultServlets() throws Exception
Exceptionpublic void testRequestQuoterWithNull()
public void testRequestQuoterWithNotNull()
public void testJersey() throws Exception
Exceptionpublic void testHasAdministratorAccess() throws Exception
Exceptionpublic void testRequiresAuthorizationAccess() throws Exception
Exceptionpublic void testBindAddress() throws Exception
Exceptionprivate org.apache.hadoop.hbase.http.HttpServer checkBindAddress(String host, int port, boolean findPort) throws Exception
Exceptionpublic void testXFrameHeaderSameOrigin() throws Exception
Exceptionpublic void testNoCacheHeader() throws Exception
Exceptionpublic void testHttpMethods() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.