Class AbstractTestX509Parameterized
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.AbstractTestX509Parameterized
- Direct Known Subclasses:
TestBCFKSFileLoader
,TestJKSFileLoader
,TestPEMFileLoader
,TestPKCS12FileLoader
,TestX509Util
Base class for parameterized unit tests that use X509TestContext for testing different X509
parameter combinations (CA key type, cert key type, with/without a password, with/without
hostname verification, etc).
This base class takes care of setting up / cleaning up the test environment, and caching the
X509TestContext objects used by the tests.
This file has been copied from the Apache ZooKeeper project.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.apache.hadoop.conf.Configuration
Because key generation and writing / deleting files is kind of expensive, we cache the certs and on-disk files between test cases.char[]
private static X509TestContextProvider
private static final HBaseCommonTestingUtil
protected X509TestContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
static void
static Collection<Object[]>
Default parameters suitable for most subclasses.void
setUp()
static void
-
Field Details
-
UTIL
-
PROVIDER
-
caKeyType
-
certKeyType
-
keyPassword
-
paramIndex
-
conf
Because key generation and writing / deleting files is kind of expensive, we cache the certs and on-disk files between test cases. None of the test cases modify any of this data so it's safe to reuse between tests. This caching makes all test cases after the first one for a given parameter combination complete almost instantly. -
x509TestContext
-
-
Constructor Details
-
AbstractTestX509Parameterized
public AbstractTestX509Parameterized()
-
-
Method Details
-
defaultParams
Default parameters suitable for most subclasses. See example usage inTestX509Util
.- Returns:
- an array of parameter combinations to test with.
-
setUpBaseClass
- Throws:
Exception
-
cleanUpBaseClass
-
setUp
- Throws:
IOException
-
cleanUp
-