Package org.apache.hadoop.hbase.http
Class TestHttpServer
java.lang.Object
org.apache.hadoop.hbase.http.HttpServerFunctionalTest
org.apache.hadoop.hbase.http.TestHttpServer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
FilterInitializer that initialized the DummyFilter.static class
Dummy filter that mimics as an authentication filter.static class
static class
static class
static class
static class
Custom user->group mapping service. -
Field Summary
Modifier and TypeFieldDescriptionprivate static URL
static final HBaseClassTestRule
private static final org.slf4j.Logger
(package private) static final int
private static org.apache.hadoop.hbase.http.HttpServer
Fields inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
TEST_BUILD_WEBAPPS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate 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 String
readFully
(InputStream input) static void
setup()
void
Verify the administrator access for /logs, /stacks, /conf, /logLevel and /metrics servlets.void
void
void
Verify the access for /logs, /stacks, /conf, /logLevel and /metrics servlets, when authentication filters are set, but authorization is not enabled.void
testEcho()
void
Test the echo map servlet that uses getParameterMap.void
void
void
void
Test that verifies headers can be up to 64K long.void
Test the maximum number of threads cannot be exceeded.void
void
void
void
void
void
Methods inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
access, createAndStartTestServer, createServer, createServer, createServer, createServer, createServer, createTestServer, createTestServer, createTestServer, createTestServer, createTestServerWithSecurity, createTestServerWithSecurityAndAcl, deleteRecursively, getFreePort, getServerURL, prepareTestWebapp, readOutput, stop
-
Field Details
-
CLASS_RULE
-
LOG
-
server
-
baseUrl
-
MAX_THREADS
- See Also:
-
-
Constructor Details
-
TestHttpServer
public TestHttpServer()
-
-
Method Details
-
setup
- Throws:
Exception
-
cleanup
- Throws:
Exception
-
testMaxThreads
Test the maximum number of threads cannot be exceeded.- Throws:
Exception
-
testEcho
- Throws:
Exception
-
testEchoMap
Test the echo map servlet that uses getParameterMap.- Throws:
Exception
-
testLongHeader
Test that verifies headers can be up to 64K long. The test adds a 63K header leaving 1K for other headers. This is because the header buffer setting is for ALL headers, names and values included.- Throws:
Exception
-
testContentTypes
- Throws:
Exception
-
testNegotiatesEncodingGzip
- Throws:
IOException
-
readFully
- Throws:
IOException
-
getHttpStatusCode
Access a URL and get the corresponding return Http status code. The URL will be accessed as the passed user, by sending user.name request parameter.- Parameters:
urlstring
- The url to accessuserName
- The user to perform access as- Returns:
- The HTTP response code
- Throws:
IOException
- if there is a problem communicating with the server
-
testDisabledAuthorizationOfDefaultServlets
Verify the access for /logs, /stacks, /conf, /logLevel and /metrics servlets, when authentication filters are set, but authorization is not enabled.- Throws:
Exception
-
testAuthorizationOfDefaultServlets
Verify the administrator access for /logs, /stacks, /conf, /logLevel and /metrics servlets.- Throws:
Exception
-
testRequestQuoterWithNull
-
testRequestQuoterWithNotNull
-
parse
-
testJersey
- Throws:
Exception
-
testHasAdministratorAccess
- Throws:
Exception
-
testRequiresAuthorizationAccess
- Throws:
Exception
-
testBindAddress
- Throws:
Exception
-
checkBindAddress
private org.apache.hadoop.hbase.http.HttpServer checkBindAddress(String host, int port, boolean findPort) throws Exception - Throws:
Exception
-
testXFrameHeaderSameOrigin
- Throws:
Exception
-
testNoCacheHeader
- Throws:
Exception
-
testHttpMethods
- Throws:
Exception
-