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
Nested ClassesModifier and TypeClassDescriptionstatic classFilterInitializer that initialized the DummyFilter.static classDummy filter that mimics as an authentication filter.static classstatic classstatic classstatic classstatic classCustom user->group mapping service. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static URLstatic final HBaseClassTestRuleprivate static final org.slf4j.Logger(package private) static final intprivate static org.apache.hadoop.hbase.http.HttpServerFields inherited from class org.apache.hadoop.hbase.http.HttpServerFunctionalTest
TEST_BUILD_WEBAPPS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.http.HttpServercheckBindAddress(String host, int port, boolean findPort) static voidcleanup()private static intgetHttpStatusCode(String urlstring, String userName) Access a URL and get the corresponding return Http status code.private static StringreadFully(InputStream input) static voidsetup()voidVerify the administrator access for /logs, /stacks, /conf, /logLevel and /metrics servlets.voidvoidvoidVerify the access for /logs, /stacks, /conf, /logLevel and /metrics servlets, when authentication filters are set, but authorization is not enabled.voidtestEcho()voidTest the echo map servlet that uses getParameterMap.voidvoidvoidvoidTest that verifies headers can be up to 64K long.voidTest the maximum number of threads cannot be exceeded.voidvoidvoidvoidvoidvoidMethods 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
-