public class SecureServerTest extends BaseJDBCTestCase
Modifier and Type | Class and Description |
---|---|
static class |
SecureServerTest.Outcome
Possible outcomes for the experiment of bringing up the server.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
_authenticationRequired |
private java.lang.String |
_customDerbyProperties |
private SecureServerTest.Outcome |
_outcome |
private boolean |
_unsecureSet |
private java.lang.String |
_wildCardHost |
private static java.lang.String |
ALTW |
private static java.lang.String |
BASIC |
(package private) java.lang.String[] |
expected6619 |
private static java.lang.String |
HOSTW |
private static java.lang.String |
IPV6W |
private NetworkServerTestSetup |
nsTestSetup
Reference to the enclosing NetworkServerTestSetup.
|
(package private) static java.lang.String |
POLICY6619 |
private static SecureServerTest.Outcome |
RUNNING_SECURITY_BOOTED |
private static SecureServerTest.Outcome |
RUNNING_SECURITY_NOT_BOOTED |
private static java.lang.String |
SST_PASSWORD |
private static java.lang.String |
SST_USER_NAME |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
SecureServerTest(boolean unsecureSet,
boolean authenticationRequired,
java.lang.String customDerbyProperties,
java.lang.String wildCardHost,
SecureServerTest.Outcome outcome) |
SecureServerTest(java.lang.String fixture) |
Modifier and Type | Method and Description |
---|---|
private void |
assertWarningDerby6619(java.lang.String logLocation,
boolean expected) |
private void |
connectToServer() |
private static junit.framework.Test |
decorateTest(boolean unsecureSet,
boolean authenticationRequired,
java.lang.String customDerbyProperties,
java.lang.String wildCardHost,
SecureServerTest.Outcome outcome)
Compose the required decorators to bring up the server in the correct
configuration.
|
private void |
disableTracing() |
private void |
enableTracing() |
private java.lang.String |
getServerOutput() |
private static java.lang.String[] |
getStartupArgs(boolean setUnsecureOption,
java.lang.String wildCardHost)
Return an array of startup args suitable for booting a server.
|
private static java.lang.String[] |
getStartupProperties(boolean authenticationRequired,
java.lang.String customDerbyProperties)
Return a set of startup properties suitable for SystemPropertyTestSetup.
|
private static junit.framework.Test |
makeDerby6619Test() |
private java.lang.String |
runServerCommand(java.lang.String[] commandSpecifics)
Run a NetworkServerControl command.
|
private void |
runsysinfo() |
private static java.lang.String |
serverBootedOK() |
private boolean |
serverCameUp() |
private void |
setTraceDirectory() |
static junit.framework.Test |
suite()
Tests to run.
|
void |
test6619() |
void |
testServerStartup()
Verify if the server came up and if so, was a security manager installed.
|
java.lang.String |
toString() |
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp
private static final java.lang.String BASIC
private static final java.lang.String SST_USER_NAME
private static final java.lang.String SST_PASSWORD
private static final java.lang.String HOSTW
private static final java.lang.String ALTW
private static final java.lang.String IPV6W
private static final SecureServerTest.Outcome RUNNING_SECURITY_NOT_BOOTED
private static final SecureServerTest.Outcome RUNNING_SECURITY_BOOTED
private NetworkServerTestSetup nsTestSetup
private boolean _unsecureSet
private boolean _authenticationRequired
private java.lang.String _customDerbyProperties
private java.lang.String _wildCardHost
private SecureServerTest.Outcome _outcome
static final java.lang.String POLICY6619
final java.lang.String[] expected6619
public SecureServerTest(boolean unsecureSet, boolean authenticationRequired, java.lang.String customDerbyProperties, java.lang.String wildCardHost, SecureServerTest.Outcome outcome)
public SecureServerTest(java.lang.String fixture)
public static junit.framework.Test suite()
private static junit.framework.Test decorateTest(boolean unsecureSet, boolean authenticationRequired, java.lang.String customDerbyProperties, java.lang.String wildCardHost, SecureServerTest.Outcome outcome)
Compose the required decorators to bring up the server in the correct configuration.
private static java.lang.String[] getStartupArgs(boolean setUnsecureOption, java.lang.String wildCardHost)
Return an array of startup args suitable for booting a server.
private static java.lang.String[] getStartupProperties(boolean authenticationRequired, java.lang.String customDerbyProperties)
Return a set of startup properties suitable for SystemPropertyTestSetup.
private static junit.framework.Test makeDerby6619Test()
public void test6619() throws java.lang.Exception
java.lang.Exception
public void testServerStartup() throws java.lang.Exception
java.lang.Exception
private void disableTracing() throws java.lang.Exception
java.lang.Exception
private void setTraceDirectory() throws java.lang.Exception
java.lang.Exception
private void connectToServer() throws java.lang.Exception
java.lang.Exception
private void runsysinfo() throws java.lang.Exception
java.lang.Exception
private void enableTracing() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class junit.framework.TestCase
private java.lang.String runServerCommand(java.lang.String[] commandSpecifics) throws java.lang.Exception
Run a NetworkServerControl command.
java.lang.Exception
private java.lang.String getServerOutput() throws java.lang.Exception
java.lang.Exception
private static java.lang.String serverBootedOK()
private boolean serverCameUp() throws java.lang.Exception
java.lang.Exception
private void assertWarningDerby6619(java.lang.String logLocation, boolean expected) throws java.io.IOException
java.io.IOException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.