| | |
| | | /** |
| | | * Installation Tester. |
| | | */ |
| | | @Test(groups = {"slow"}) |
| | | @Test(enabled=false, groups = {"slow"}) |
| | | public class InstallationTest extends QuickSetupTestCase { |
| | | |
| | | Installation installation; |
| | |
| | | /** |
| | | * Tests to make sure installation is valid. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testValidateRootDirectory() { |
| | | Installation.validateRootDirectory(Utils.getQuickSetupTestServerRootDir()); |
| | | } |
| | |
| | | /** |
| | | * Tests that installation root directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetRootDirectory() { |
| | | assertNotNull(installation.getRootDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests that the installation root directory can be set. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testSetRootDirectory() { |
| | | File root = installation.getRootDirectory(); |
| | | installation.setRootDirectory(root); |
| | |
| | | /** |
| | | * Tests that the installation root is valid. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testIsValid() { |
| | | assertTrue(installation.isValid()); |
| | | } |
| | |
| | | * Tests that an installation directory missing required directories |
| | | * is considered invalid. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testIsValid2() { |
| | | assertTrue(installation.isValid()); |
| | | File x = new File(installation.getRootDirectory(), "x"); |
| | |
| | | /** |
| | | * Tests the configuration is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetCurrentConfiguration() { |
| | | assertNotNull(installation.getCurrentConfiguration()); |
| | | } |
| | |
| | | /** |
| | | * Tests the base configuration is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBaseConfiguration() throws ApplicationException { |
| | | assertNotNull(installation.getBaseConfiguration()); |
| | | } |
| | |
| | | /** |
| | | * Tests the status is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetStatus() { |
| | | assertNotNull(installation.getStatus()); |
| | | } |
| | |
| | | /** |
| | | * Tests the lib directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetLibrariesDirectory() { |
| | | assertExistentFile(installation.getLibrariesDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the schema concat file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetSchemaConcatFile() { |
| | | assertNonexistentFile(installation.getSchemaConcatFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the base schema file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBaseSchemaFile() throws ApplicationException { |
| | | assertExistentFile(installation.getBaseSchemaFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the base config file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBaseConfigurationFile() throws ApplicationException { |
| | | assertExistentFile(installation.getBaseConfigurationFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the SVN rev number is discernable. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetSvnRev() throws ApplicationException { |
| | | assertNotNull(installation.getSvnRev()); |
| | | } |
| | |
| | | /** |
| | | * Tests the config file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetCurrentConfigurationFile() { |
| | | assertExistentFile(installation.getCurrentConfigurationFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the bin/bat directory is available and platform appropriate. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBinariesDirectory() { |
| | | File binariesDir; |
| | | assertExistentFile(binariesDir = installation.getBinariesDirectory()); |
| | |
| | | /** |
| | | * Tests the db directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetDatabasesDirectory() { |
| | | assertExistentFile(installation.getDatabasesDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the backup directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBackupDirectory() { |
| | | assertExistentFile(installation.getBackupDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the config directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetConfigurationDirectory() { |
| | | assertExistentFile(installation.getConfigurationDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the logs directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetLogsDirectory() { |
| | | assertExistentFile(installation.getLogsDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the locks directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetLocksDirectory() { |
| | | assertExistentFile(installation.getLocksDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the tmp directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetTemporaryDirectory() { |
| | | assertNonexistentFile(installation.getTemporaryDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the history directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetHistoryDirectory() { |
| | | assertNonexistentFile(installation.getHistoryDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests a historical backup directory can be created. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testCreateHistoryBackupDirectory() throws IOException { |
| | | assertExistentFile(installation.createHistoryBackupDirectory()); |
| | | assertExistentFile(installation.getHistoryDirectory()); |
| | |
| | | /** |
| | | * Tests the history log file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetHistoryLogFile() { |
| | | assertNonexistentFile(installation.getHistoryLogFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the config upgrade directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetConfigurationUpgradeDirectory() { |
| | | assertExistentFile(installation.getConfigurationUpgradeDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the tmp/upgrade directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetTemporaryUpgradeDirectory() { |
| | | assertNonexistentFile(installation.getTemporaryUpgradeDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests getting a command file works. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetCommandFile() { |
| | | assertExistentFile(installation.getCommandFile( |
| | | Installation.UNIX_START_FILE_NAME)); |
| | |
| | | /** |
| | | * Tests the start server command is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetServerStartCommandFile() { |
| | | assertExistentFile(installation.getServerStartCommandFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the stop server command is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetServerStopCommandFile() { |
| | | assertExistentFile(installation.getServerStopCommandFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the ldif directory is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetLdifDirectory() { |
| | | assertExistentFile(installation.getLdifDirectory()); |
| | | } |
| | |
| | | /** |
| | | * Tests the quicksetup jar is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetQuicksetupJarFile() { |
| | | assertExistentFile(installation.getQuicksetupJarFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the OpenDS jar is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetOpenDSJarFile() { |
| | | assertExistentFile(installation.getOpenDSJarFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the uninstall file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetUninstallBatFile() { |
| | | assertExistentFile(installation.getUninstallBatFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the status panel command file is available. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetStatusPanelCommandFile() { |
| | | assertExistentFile(installation.getStatusPanelCommandFile()); |
| | | } |
| | |
| | | /** |
| | | * Tests the build information is discernable. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBuildInformation() throws ApplicationException { |
| | | assertNotNull(installation.getBuildInformation()); |
| | | } |
| | |
| | | /** |
| | | * Tests the build information is discernable. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testGetBuildInformation1() throws ApplicationException { |
| | | assertNotNull(installation.getBuildInformation(true)); |
| | | assertNotNull(installation.getBuildInformation(false)); |
| | |
| | | /** |
| | | * Test string representation is possible. |
| | | */ |
| | | @Test |
| | | @Test(enabled=false) |
| | | public void testToString() { |
| | | assertNotNull(installation.toString()); |
| | | } |