From 0df0e169b5121bdee1d76bc225362b28575e569d Mon Sep 17 00:00:00 2001
From: el_kaboing <el_kaboing@localhost>
Date: Tue, 26 Sep 2006 19:06:53 +0000
Subject: [PATCH] Finished with the comment blocks for parsing test specs.
---
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTests.java | 76 +
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests.java | 2114 +++++++++++++++++++++++++++++++++++++++++++++
/dev/null | 170 ---
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTasksTests.java | 23
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackendStartupTests.java | 22
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTests.java | 207 ++++
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTests.java | 36
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTasksTests.java | 23
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTasksTests.java | 25
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTasksTests.java | 23
10 files changed, 2,548 insertions(+), 171 deletions(-)
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackendStartupTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackendStartupTests.java
index 78ba0d0..af3f897 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackendStartupTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackendStartupTests.java
@@ -30,12 +30,34 @@
import org.testng.annotations.*;
import org.opends.server.tools.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Setup
+ #@TestSuitePurpose Setup methods for the Backend test suites
+ #@TestSuiteID Setup
+ #@TestSuiteGroup Backend
+ #@TestGroup Backend
+ #@TestScript BackendStartupTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend startup.
*/
@Test
public class BackendStartupTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Setup
+ #@TestName Backend Setup 1
+ #@TestID BackendStartup1
+ #@TestPreamble
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the filename to the appropriate ldif file.
+ #@TestPostamble
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
/**
* Add entries that are required for the Backend Tests.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTasksTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTasksTests.java
index c37286a..6171d6f 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTasksTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTasksTests.java
@@ -31,11 +31,34 @@
import org.opends.server.tools.*;
import java.io.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Backup Tasks Tests
+ #@TestSuitePurpose Test the backup tasks functionality for OpenDS
+ #@TestSuiteID Backup Tasks Tests
+ #@TestSuiteGroup Backup Tasks
+ #@TestGroup Backend
+ #@TestScript BackupTasksTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for backup
*/
public class BackupTasksTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tasks Tests
+ #@TestName Backup Tasks 1
+ #@TestID BackupTasks1
+ #@TestPreamble
+ #@TestSteps An ldif file is created that describes the backup task to be
+ scheduled. The task is scheduled by adding the ldif file
+ with the static method, LDAPModify.mainModify().
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
/**
* Create a backup of the data in OpenDS by scheduling a task.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTests.java
index 5520145..3ceb28a 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/BackupTests.java
@@ -33,6 +33,16 @@
import java.util.Calendar;
import java.util.GregorianCalendar;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Backup Tests
+ #@TestSuitePurpose Test the backup functionality for OpenDS
+ #@TestSuiteID Backup Tests
+ #@TestSuiteGroup Backup
+ #@TestGroup Backend
+ #@TestScript BackupTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for backup
*/
@@ -41,6 +51,19 @@
{
public String backup_id = null;
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tests
+ #@TestName Backup 1
+ #@TestID Backup1
+ #@TestPreamble
+ #@TestSteps Client calls static method BackUpDB.mainBackUpDB()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, and --backupDirectory.
+ #@TestPostamble
+ #@TestResult Success if BackUpDB.mainBackUpDB() returns 0
+*/
/**
* Create a backup of the data in OpenDS.
*
@@ -70,6 +93,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tests
+ #@TestName Backup 2
+ #@TestID Backup2
+ #@TestPreamble
+ #@TestSteps Client calls static method BackUpDB.mainBackUpDB()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --backupDirectory and --incremental.
+ #@TestPostamble
+ #@TestResult Success if BackUpDB.mainBackUpDB() returns 0
+*/
/**
* Create an incremental backup of the data in OpenDS.
*
@@ -111,6 +147,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tests
+ #@TestName Backup 3
+ #@TestID Backup3
+ #@TestPreamble
+ #@TestSteps Client calls static method BackUpDB.mainBackUpDB()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --backupDirectory and --backupID.
+ #@TestPostamble
+ #@TestResult Success if BackUpDB.mainBackUpDB() returns 0
+*/
/**
* Create a backup of the data in OpenDS with a backup id.
*
@@ -142,6 +191,20 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tests
+ #@TestName Backup 4
+ #@TestID Backup4
+ #@TestPreamble
+ #@TestSteps Client calls static method BackUpDB.mainBackUpDB()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --backupDirectory, --incremental,
+ and --incrementalBaseID.
+ #@TestPostamble
+ #@TestResult Success if BackUpDB.mainBackUpDB() returns 0
+*/
/**
* Create an incremental backup of the data in OpenDS with a backup id.
*
@@ -185,6 +248,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Backup Tests
+ #@TestName Backup 5
+ #@TestID Backup5
+ #@TestPreamble
+ #@TestSteps Client calls static method BackUpDB.mainBackUpDB()
+ with the parameters, --configClass, --configFileHandler,
+ and --compress.
+ #@TestPostamble
+ #@TestResult Success if BackUpDB.mainBackUpDB() returns 0
+*/
/**
* Create a compressed backup of the data in OpenDS.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTasksTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTasksTests.java
index 8b24bf8..0f37d6d 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTasksTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTasksTests.java
@@ -31,12 +31,35 @@
import org.opends.server.tools.*;
import java.io.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Export Tasks Tests
+ #@TestSuitePurpose Test the backend functionality for OpenDS
+ #@TestSuiteID Export Tasks Tests
+ #@TestSuiteGroup Export Tasks
+ #@TestGroup Backend
+ #@TestScript ExportTasksTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for export
*/
@Test
public class ExportTasksTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tasks Tests
+ #@TestName Export Tasks 1
+ #@TestID ExportTasks1
+ #@TestPreamble
+ #@TestSteps An ldif file is created that describes the export task to be
+ scheduled. The task is scheduled by adding the ldif file
+ with the static method, LDAPModify.mainModify().
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
/**
* Export the data in OpenDS by scheduling a task.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTests.java
index 95f673e..425a9bd 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ExportTests.java
@@ -31,12 +31,35 @@
import org.opends.server.tools.*;
import java.io.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Export Tests
+ #@TestSuitePurpose Test the export functionality for OpenDS
+ #@TestSuiteID Export Tests
+ #@TestSuiteGroup Export
+ #@TestGroup Backend
+ #@TestScript ExportTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for export
*/
@Test
public class ExportTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 1
+ #@TestID Export1
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, and --ldifFile.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS.
*
@@ -70,6 +93,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 2
+ #@TestID Export2
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --append.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS by appending to an ldif file.
*
@@ -103,6 +139,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 3
+ #@TestID Export3
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --includeAttribute.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --includeAttribute parameter.
*
@@ -136,6 +185,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 4
+ #@TestID Export4
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and three --includeAttributes.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with three --includeAttribute parameters.
*
@@ -169,6 +231,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 5
+ #@TestID Export5
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --excludeAttribute.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --excludeAttribute parameter.
*
@@ -202,6 +277,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 6
+ #@TestID Export6
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and three --excludeAttributes.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with three --excludeAttribute parameters.
*
@@ -235,6 +323,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 7
+ #@TestID Export7
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --includeFilter.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --includeFilter parameter.
*
@@ -268,6 +369,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 8
+ #@TestID Export8
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and three --includeFilters.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with three --includeFilter parameters.
*
@@ -301,6 +415,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 9
+ #@TestID Export9
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --excludeFilter.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --excludeFilter parameter.
*
@@ -334,6 +461,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 10
+ #@TestID Export10
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and three --excludeFilters.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with three --excludeFilter parameters.
*
@@ -367,6 +507,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 11
+ #@TestID Export11
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --includeBranch.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --includeBranch parameter.
*
@@ -400,6 +553,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 12
+ #@TestID Export12
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --excludeBranch.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --excludeBranch parameter.
*
@@ -433,6 +599,20 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 13
+ #@TestID Export13
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile,
+ --includeAttribute, --excludeFilter, and --includeBranch.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --includeAttribute,
* one --excludeFilter, and one --includeBranch parameter.
@@ -467,6 +647,20 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 14
+ #@TestID Export14
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile,
+ --excludeAttribute, --includeFilter, and --excludeBranch.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS with one --excludeAttribute,
* one --includeFilter, and one --excludeBranch parameter.
@@ -501,6 +695,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Export Tests
+ #@TestName Export 15
+ #@TestID Export15
+ #@TestPreamble
+ #@TestSteps Client calls static method ExportLDIF.mainExportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ --backendID, --ldifFile, and --compressLDIF.
+ #@TestPostamble
+ #@TestResult Success if ExportLDIF.mainExportLDIF() returns 0
+*/
/**
* Export the data in OpenDS in compressed format.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTasksTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTasksTests.java
index 4c8d32b..81c2a18 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTasksTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTasksTests.java
@@ -31,12 +31,35 @@
import org.opends.server.tools.*;
import java.io.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Import Tasks Tests
+ #@TestSuitePurpose Test the import tasks functionality for OpenDS
+ #@TestSuiteID Import Tasks Tests
+ #@TestSuiteGroup Import Tasks
+ #@TestGroup Backend
+ #@TestScript ImportTasksTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for import
*/
@Test
public class ImportTasksTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tasks Tests
+ #@TestName Import Tasks 1
+ #@TestID ImportTasks1
+ #@TestPreamble
+ #@TestSteps An ldif file is created that describes the import task to be
+ scheduled. The task is scheduled by adding the ldif file
+ with the static method, LDAPModify.mainModify().
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
/**
* Import data in OpenDS by scheduling a task.
*
@@ -55,7 +78,7 @@
* be placed.
*/
@Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests14.testImport14_check" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport14_check" })
public void testImportTasks1(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
{
System.out.println("*********************************************");
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests.java
new file mode 100644
index 0000000..f5415a3
--- /dev/null
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests.java
@@ -0,0 +1,2114 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006 Sun Microsystems, Inc.
+ */
+package org.opends.server.integration.backend;
+
+import static org.testng.Assert.*;
+import org.testng.annotations.*;
+import org.opends.server.tools.*;
+
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Import Tests
+ #@TestSuitePurpose Test the import functionality for OpenDS
+ #@TestSuiteID Import Tests
+ #@TestSuiteGroup Import
+ #@TestGroup Backend
+ #@TestScript ImportTests.java
+ #@TestHTMLLink
+*/
+/**
+ * This class contains the TestNG tests for the Backend functional tests for import
+ */
+@Test
+public class ImportTests extends BackendTests
+{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 1
+ #@TestID Import1
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, and --ldfiFile.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.BackupTasksTests.testBackupTasks1" })
+ public void testImport1(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 1");
+ String datafile = integration_test_home + "/backend/data/import.ldif.01";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest1.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 1 Check Entries 1
+ #@TestID Import1_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport1" })
+ public void testImport1_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 1 check entries 1");
+ String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest1check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 1 Check Entries 2
+ #@TestID Import1_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present before the last import test.
+ The entry should no longer be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport1_check" })
+ public void testImport1_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 1 check entries 2");
+ String base = "uid=scarter, ou=People, o=backend tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest1check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 2
+ #@TestID Import2
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, and --append.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with the --append parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport1_check2" })
+ public void testImport2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 2");
+ String datafile = integration_test_home + "/backend/data/import.ldif.02";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--append"};
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest2.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 2 Check Entries 1
+ #@TestID Import2_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport2" })
+ public void testImport2_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 2 check entries 1");
+ String base = "uid=scarter, ou=People, o=test two, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest2check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 2 Check Entries 2
+ #@TestID Import2_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present before the last import test.
+ The entry should still be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport2_check" })
+ public void testImport2_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 2 check entries 2");
+ String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest2check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 3
+ #@TestID Import3
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and three --includeAttributes.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with three --includeAttribute parameters.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport2_check2" })
+ public void testImport3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 3");
+ String datafile = integration_test_home + "/backend/data/import.ldif.03";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeAttribute", "sn", "--includeAttribute", "cn", "--includeAttribute", "ou", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest3.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 3 Check Entries 1
+ #@TestID Import3_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport3" })
+ public void testImport3_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 3 check entries 1");
+ String base = "uid=prigden3,ou=People,o=test one,o=import tests,dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest3check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 3 Check Entries 2
+ #@TestID Import3_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present before the last import test.
+ The entry should still be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport3_check" })
+ public void testImport3_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 3 check entries 2");
+ String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest3check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 4
+ #@TestID Import4
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and --excludeAttribute.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --excludeAttribute parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport3_check2" })
+ public void testImport4(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 4");
+ String datafile = integration_test_home + "/backend/data/import.ldif.04";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeAttribute", "telephonenumber", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest4.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 4 Check Entries 1
+ #@TestID Import4_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport4" })
+ public void testImport4_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 4 check entries 1");
+ String base = "uid=prigden4, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest4check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 4 Check Entries 2
+ #@TestID Import4_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present before the last import test.
+ The entry should still be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport4_check" })
+ public void testImport4_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 4 check entries 2");
+ String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest4check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 5
+ #@TestID Import5
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and three --excludeAttributes.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with three --excludeAtribute parameters.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport4_check2" })
+ public void testImport5(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 5");
+ String datafile = integration_test_home + "/backend/data/import.ldif.05";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeAttribute", "telephonenumber", "--excludeAttribute", "mail", "--excludeAttribute", "roomnumber", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest5.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 5 Check Entries 1
+ #@TestID Import5_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport5" })
+ public void testImport5_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 5 check entries 1");
+ String base = "uid=prigden5, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest5check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 5 Check Entries 2
+ #@TestID Import5_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present before the last import test.
+ The entry should still be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport5_check" })
+ public void testImport5_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 5 check entries 2");
+ String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest5check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 6
+ #@TestID Import6
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and --includeFilter.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS one --includeFilter parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport5_check2" })
+ public void testImport6(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 6");
+ String datafile = integration_test_home + "/backend/data/import.ldif.06";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden6)(telephonenumber=*))", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest6.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 6 Check Entries 1
+ #@TestID Import6_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport6" })
+ public void testImport6_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 6 check entries 1");
+ String base = "uid=prigden6, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest6check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 6 Check Entries 2
+ #@TestID Import6_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport6_check" })
+ public void testImport6_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 6 check entries 2");
+ String base = "uid=brigden6, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest6check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 7
+ #@TestID Import7
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and three --includeFilters.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with three --includeFilter attributes.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport6_check2" })
+ public void testImport7(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 7");
+ String datafile = integration_test_home + "/backend/data/import.ldif.07";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden7)(telephonenumber=*))", "--includeFilter", "(&(uid=prigden7)(l=Sunnyvale))", "--includeFilter", "(&(uid=brigden7)(roomnumber=*))", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest7.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 7 Check Entries 1
+ #@TestID Import7_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport7" })
+ public void testImport7_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 7 check entries 1");
+ String base = "uid=prigden7, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest7check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 7 Check Entries 2
+ #@TestID Import7_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport7_check" })
+ public void testImport7_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 7 check entries 2");
+ String base = "uid=trigden7, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest7check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 8
+ #@TestID Import8
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and --excludeFilter.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --excludeFilter attribute.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport7_check2" })
+ public void testImport8(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 8");
+ String datafile = integration_test_home + "/backend/data/import.ldif.08";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden8)(telephonenumber=*))", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest8.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 8 Check Entries 1
+ #@TestID Import8_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport8" })
+ public void testImport8_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 8 check entries 1");
+ String base = "uid=brigden8, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest8check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 8 Check Entries 2
+ #@TestID Import8_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport8_check" })
+ public void testImport8_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 8 check entries 2");
+ String base = "uid=prigden8, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest8check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 9
+ #@TestID Import9
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and three --excludeFilters.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with three --excludeFilters parameters.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport8_check2" })
+ public void testImport9(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 9");
+ String datafile = integration_test_home + "/backend/data/import.ldif.09";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden9)(telephonenumber=*))", "--excludeFilter", "(&(uid=prigden9)(l=Sunnyvale))", "--excludeFilter", "(&(uid=brigden9)(roomnumber=*))", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest9.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 9 Check Entries 1
+ #@TestID Import9_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport9" })
+ public void testImport9_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 9 check entries 1");
+ String base = "uid=trigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest9check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 9 Check Entries 2
+ #@TestID Import9_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport9_check" })
+ public void testImport9_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 9 check entries 2");
+ String base = "uid=prigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest9check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 9 Check Entries 3
+ #@TestID Import9_check3
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Third verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport9_check2" })
+ public void testImport9_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 9 check entries 3");
+ String base = "uid=brigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest9check3.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 10
+ #@TestID Import10
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and --includeBranch.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --includeBranch parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport9_check3" })
+ public void testImport10(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 10");
+ String datafile = integration_test_home + "/backend/data/import.ldif.10";
+ String branch = "o=branch test two, o=import tests, dc=example,dc=com";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeBranch", branch, "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest10.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 10 Check Entries 1
+ #@TestID Import10_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport10" })
+ public void testImport10_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 10 check entries 1");
+ String base = " uid=scarter, ou=People, o=branch test two, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest10check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 10 Check Entries 2
+ #@TestID Import10_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport10_check" })
+ public void testImport10_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 10 check entries 2");
+ String base = " uid=scarter, ou=People, o=branch test one, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest10check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 11
+ #@TestID Import11
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ and --excludeBranch.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --excludeBranch parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport10_check2" })
+ public void testImport11(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 11");
+ String datafile = integration_test_home + "/backend/data/import.ldif.11";
+ String branch = "o=branch test four, o=import tests, dc=example,dc=com";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeBranch", branch, "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest11.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 11 Check Entries 1
+ #@TestID Import11_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport11" })
+ public void testImport11_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 11 check entries 1");
+ String base = " uid=scarter, ou=People, o=branch test three, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest11check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 11 Check Entries 2
+ #@TestID Import11_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport11_check" })
+ public void testImport11_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 11 check entries 2");
+ String base = " uid=scarter, ou=People, o=branch test four, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest11check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 12
+ #@TestID Import12
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ --excludeAttribute, --excludeFilter and --includeBranch.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --excludeAttribute, one --excludeFilter, and
+ * one --includeBranch parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport11_check2" })
+ public void testImport12(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 12");
+ String datafile = integration_test_home + "/backend/data/import.ldif.12";
+ String branch = "o=branch test six, o=import tests, dc=example,dc=com";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden)(roomnumber=*))", "--excludeAttribute", "telephonenumber", "--includeBranch", branch, "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest12.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 12 Check Entries 1
+ #@TestID Import12_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport12" })
+ public void testImport12_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 12 check entries 1");
+ String base = " uid=scarter, ou=People, o=branch test six, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest12check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 12 Check Entries 2
+ #@TestID Import12_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport12_check" })
+ public void testImport12_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 12 check entries 2");
+ String base = " uid=prigden, ou=People, o=branch test six, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest12check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 12 Check Entries 3
+ #@TestID Import12_check3
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Third verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport12_check2" })
+ public void testImport12_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 12 check entries 3");
+ String base = " uid=scarter, ou=People, o=branch test five, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest12check3.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 13
+ #@TestID Import13
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, --append,
+ --excludeAttribute, --includeFilter and --excludeBranch.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import data to OpenDS with one --excludeAttribute, one --includeFilter, and
+ * one --excludeBranch parameter.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport12_check3" })
+ public void testImport13(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 13");
+ String datafile = integration_test_home + "/backend/data/branchTestAdd.ldif";
+ String backup_mod_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile};
+
+ ds_output.redirectOutput(logDir, "ImportTest13_premod.txt");
+ LDAPModify.mainModify(backup_mod_args);
+ ds_output.resetOutput();
+
+ datafile = integration_test_home + "/backend/data/import.ldif.13";
+ String branch = "o=branch test eight, o=import tests, dc=example,dc=com";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden)(roomnumber=*))", "--excludeAttribute", "telephonenumber", "--excludeBranch", branch, "--append"};
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest13.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 13 Check Entries 1
+ #@TestID Import13_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport13" })
+ public void testImport13_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 13 check entries 1");
+ String base = " uid=prigden, ou=People, o=branch test seven, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest13check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 13 Check Entries 2
+ #@TestID Import13_check2
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Second verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport13_check" })
+ public void testImport13_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 13 check entries 2");
+ String base = " uid=prigden, ou=People, o=branch test eight, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest13check2.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 13 Check Entries 3
+ #@TestID Import13_check3
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was present in the ldif file
+ but should have been filtered out during the import.
+ The entry should not be present.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 32
+*/
+/**
+ * Third verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport13_check2" })
+ public void testImport13_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 13 check entries 3");
+ String base = " uid=scarter, ou=People, o=branch test eight, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest13check3.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 32;
+
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 14
+ #@TestID Import14
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method ImportLDIF.mainImportLDIF()
+ with the parameters, --configClass, --configFileHandler,
+ backendID, --ldifFile, and --isCompressed.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if ImportLDIF.mainImportLDIF() returns 0
+*/
+/**
+ * Import compressed data to OpenDS.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+ * @param dsee_home The home directory for the OpenDS
+ * installation.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport13_check3" })
+ public void testImport14(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 14");
+ String datafile = integration_test_home + "/backend/data/import.compressed.ldif";
+ String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--isCompressed", "--append"};
+
+ stopOpenDS(dsee_home, port);
+
+ ds_output.redirectOutput(logDir, "ImportTest14.txt");
+ int retCode = ImportLDIF.mainImportLDIF(import_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ if(retCode == expCode)
+ {
+ if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
+ {
+ retCode = 999;
+ }
+ }
+ compareExitCode(retCode, expCode);
+ }
+
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Import Tests
+ #@TestName Import 14 Check Entries 1
+ #@TestID Import14_check
+ #@TestPreamble
+ #@TestSteps Client calls static method LDAPSearch.mainSearch()
+ for an entry that was imported in the last import test.
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
+/**
+ * First verification search for the entries that were imported in the last test.
+ *
+ * @param hostname The hostname for the server where OpenDS
+ * is installed.
+ * @param port The port number for OpenDS.
+ * @param bindDN The bind DN.
+ * @param bindPW The password for the bind DN.
+ * @param integration_test_home The home directory for the Integration
+ * Test Suites.
+ * @param logDir The directory for the log files that are
+ * generated during the Integration Tests.
+*/
+ @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
+ @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests.testImport14" })
+ public void testImport14_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
+ {
+ System.out.println("*********************************************");
+ System.out.println("Import Test 14 check entries 1");
+ String base = "uid=scarter, ou=People, o=compressed test, o=import tests, dc=example,dc=com";
+ String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
+
+ ds_output.redirectOutput(logDir, "ImportTest14check1.txt");
+ int retCode = LDAPSearch.mainSearch(search_args);
+ ds_output.resetOutput();
+ int expCode = 0;
+
+ compareExitCode(retCode, expCode);
+ }
+
+}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests1.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests1.java
deleted file mode 100644
index 28668c1..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests1.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests1 extends BackendTests
-{
-/**
- * Import data to OpenDS.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.BackupTasksTests.testBackupTasks1" })
- public void testImport1(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 1");
- String datafile = integration_test_home + "/backend/data/import.ldif.01";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest1.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests1.testImport1" })
- public void testImport1_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 1 check entries 1");
- String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest1check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests1.testImport1_check" })
- public void testImport1_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 1 check entries 2");
- String base = "uid=scarter, ou=People, o=backend tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest1check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests10.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests10.java
deleted file mode 100644
index 8e69c61..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests10.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests10 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --includeBranch parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests9.testImport9_check3" })
- public void testImport10(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 10");
- String datafile = integration_test_home + "/backend/data/import.ldif.10";
- String branch = "o=branch test two, o=import tests, dc=example,dc=com";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeBranch", branch, "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest10.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests10.testImport10" })
- public void testImport10_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 10 check entries 1");
- String base = " uid=scarter, ou=People, o=branch test two, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest10check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests10.testImport10_check" })
- public void testImport10_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 10 check entries 2");
- String base = " uid=scarter, ou=People, o=branch test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest10check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests11.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests11.java
deleted file mode 100644
index 2f76a69..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests11.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests11 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --excludeBranch parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests10.testImport10_check2" })
- public void testImport11(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 11");
- String datafile = integration_test_home + "/backend/data/import.ldif.11";
- String branch = "o=branch test four, o=import tests, dc=example,dc=com";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeBranch", branch, "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest11.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests11.testImport11" })
- public void testImport11_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 11 check entries 1");
- String base = " uid=scarter, ou=People, o=branch test three, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest11check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests11.testImport11_check" })
- public void testImport11_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 11 check entries 2");
- String base = " uid=scarter, ou=People, o=branch test four, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest11check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests12.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests12.java
deleted file mode 100644
index 6954c00..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests12.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests12 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --excludeAttribute, one --excludeFilter, and
- * one --includeBranch parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests11.testImport11_check2" })
- public void testImport12(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 12");
- String datafile = integration_test_home + "/backend/data/import.ldif.12";
- String branch = "o=branch test six, o=import tests, dc=example,dc=com";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden)(roomnumber=*))", "--excludeAttribute", "telephonenumber", "--includeBranch", branch, "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest12.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests12.testImport12" })
- public void testImport12_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 12 check entries 1");
- String base = " uid=scarter, ou=People, o=branch test six, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest12check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests12.testImport12_check" })
- public void testImport12_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 12 check entries 2");
- String base = " uid=prigden, ou=People, o=branch test six, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest12check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Third verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests12.testImport12_check2" })
- public void testImport12_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 12 check entries 3");
- String base = " uid=scarter, ou=People, o=branch test five, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest12check3.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests13.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests13.java
deleted file mode 100644
index 1929e5f..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests13.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests13 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --excludeAttribute, one --includeFilter, and
- * one --excludeBranch parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests12.testImport12_check3" })
- public void testImport13(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 13");
- String datafile = integration_test_home + "/backend/data/branchTestAdd.ldif";
- String backup_mod_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile};
-
- ds_output.redirectOutput(logDir, "ImportTest13_premod.txt");
- LDAPModify.mainModify(backup_mod_args);
- ds_output.resetOutput();
-
- datafile = integration_test_home + "/backend/data/import.ldif.13";
- String branch = "o=branch test eight, o=import tests, dc=example,dc=com";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden)(roomnumber=*))", "--excludeAttribute", "telephonenumber", "--excludeBranch", branch, "--append"};
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest13.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests13.testImport13" })
- public void testImport13_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 13 check entries 1");
- String base = " uid=prigden, ou=People, o=branch test seven, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest13check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests13.testImport13_check" })
- public void testImport13_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 13 check entries 2");
- String base = " uid=prigden, ou=People, o=branch test eight, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest13check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Third verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests13.testImport13_check2" })
- public void testImport13_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 13 check entries 3");
- String base = " uid=scarter, ou=People, o=branch test eight, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest13check3.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests14.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests14.java
deleted file mode 100644
index 9131d79..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests14.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests14 extends BackendTests
-{
-/**
- * Import compressed data to OpenDS.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests13.testImport13_check3" })
- public void testImport14(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 14");
- String datafile = integration_test_home + "/backend/data/import.compressed.ldif";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--isCompressed", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest14.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests14.testImport14" })
- public void testImport14_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 14 check entries 1");
- String base = "uid=scarter, ou=People, o=compressed test, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest14check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests2.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests2.java
deleted file mode 100644
index 33a367a..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests2.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests2 extends BackendTests
-{
-/**
- * Import data to OpenDS with the --append parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests1.testImport1_check2" })
- public void testImport2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 2");
- String datafile = integration_test_home + "/backend/data/import.ldif.02";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--append"};
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest2.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests2.testImport2" })
- public void testImport2_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 2 check entries 1");
- String base = "uid=scarter, ou=People, o=test two, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest2check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests2.testImport2_check" })
- public void testImport2_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 2 check entries 2");
- String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest2check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests3.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests3.java
deleted file mode 100644
index 6f871f9..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests3.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests3 extends BackendTests
-{
-/**
- * Import data to OpenDS with three --includeAttribute parameters.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests2.testImport2_check2" })
- public void testImport3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 3");
- String datafile = integration_test_home + "/backend/data/import.ldif.03";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeAttribute", "sn", "--includeAttribute", "cn", "--includeAttribute", "ou", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest3.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests3.testImport3" })
- public void testImport3_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 3 check entries 1");
- String base = "uid=prigden3,ou=People,o=test one,o=import tests,dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest3check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests3.testImport3_check" })
- public void testImport3_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 3 check entries 2");
- String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest3check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests4.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests4.java
deleted file mode 100644
index 5aa2d47..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests4.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests4 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --excludeAttribute parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests3.testImport3_check2" })
- public void testImport4(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 4");
- String datafile = integration_test_home + "/backend/data/import.ldif.04";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeAttribute", "telephonenumber", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest4.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests4.testImport4" })
- public void testImport4_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 4 check entries 1");
- String base = "uid=prigden4, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest4check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests4.testImport4_check" })
- public void testImport4_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 4 check entries 2");
- String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest4check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests5.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests5.java
deleted file mode 100644
index 62849d1..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests5.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests5 extends BackendTests
-{
-/**
- * Import data to OpenDS with three --excludeAtribute parameters.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests4.testImport4_check2" })
- public void testImport5(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 5");
- String datafile = integration_test_home + "/backend/data/import.ldif.05";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeAttribute", "telephonenumber", "--excludeAttribute", "mail", "--excludeAttribute", "roomnumber", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest5.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests5.testImport5" })
- public void testImport5_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 5 check entries 1");
- String base = "uid=prigden5, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest5check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests5.testImport5_check" })
- public void testImport5_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 5 check entries 2");
- String base = "uid=scarter, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest5check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests6.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests6.java
deleted file mode 100644
index dd46297..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests6.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests6 extends BackendTests
-{
-/**
- * Import data to OpenDS one --includeFilter parameter.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests5.testImport5_check2" })
- public void testImport6(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 6");
- String datafile = integration_test_home + "/backend/data/import.ldif.06";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden6)(telephonenumber=*))", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest6.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests6.testImport6" })
- public void testImport6_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 6 check entries 1");
- String base = "uid=prigden6, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest6check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests6.testImport6_check" })
- public void testImport6_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 6 check entries 2");
- String base = "uid=brigden6, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest6check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests7.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests7.java
deleted file mode 100644
index c9f3117..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests7.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests7 extends BackendTests
-{
-/**
- * Import data to OpenDS with three --includeFilter attributes.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests6.testImport6_check2" })
- public void testImport7(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 7");
- String datafile = integration_test_home + "/backend/data/import.ldif.07";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--includeFilter", "(&(uid=prigden7)(telephonenumber=*))", "--includeFilter", "(&(uid=prigden7)(l=Sunnyvale))", "--includeFilter", "(&(uid=brigden7)(roomnumber=*))", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest7.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests7.testImport7" })
- public void testImport7_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 7 check entries 1");
- String base = "uid=prigden7, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest7check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests7.testImport7_check" })
- public void testImport7_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 7 check entries 2");
- String base = "uid=trigden7, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest7check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests8.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests8.java
deleted file mode 100644
index c2bb027..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests8.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests8 extends BackendTests
-{
-/**
- * Import data to OpenDS with one --excludeFilter attribute.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests7.testImport7_check2" })
- public void testImport8(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 8");
- String datafile = integration_test_home + "/backend/data/import.ldif.08";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden8)(telephonenumber=*))", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest8.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests8.testImport8" })
- public void testImport8_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 8 check entries 1");
- String base = "uid=brigden8, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest8check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests8.testImport8_check" })
- public void testImport8_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 8 check entries 2");
- String base = "uid=prigden8, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest8check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests9.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests9.java
deleted file mode 100644
index 85beaa4..0000000
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/ImportTests9.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.integration.backend;
-
-import static org.testng.Assert.*;
-import org.testng.annotations.*;
-import org.opends.server.tools.*;
-
-/**
- * This class contains the TestNG tests for the Backend functional tests for import
- */
-@Test
-public class ImportTests9 extends BackendTests
-{
-/**
- * Import data to OpenDS with three --excludeFilters parameters.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
- * @param dsee_home The home directory for the OpenDS
- * installation.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir", "dsee_home" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests8.testImport8_check2" })
- public void testImport9(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir, String dsee_home) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 9");
- String datafile = integration_test_home + "/backend/data/import.ldif.09";
- String import_args[] = {"--configClass", "org.opends.server.config.ConfigFileHandler", "--configFile", dsee_home + "/config/config.ldif", "--backendID", "userRoot", "--ldifFile", datafile, "--excludeFilter", "(&(uid=prigden9)(telephonenumber=*))", "--excludeFilter", "(&(uid=prigden9)(l=Sunnyvale))", "--excludeFilter", "(&(uid=brigden9)(roomnumber=*))", "--append"};
-
- stopOpenDS(dsee_home, port);
-
- ds_output.redirectOutput(logDir, "ImportTest9.txt");
- int retCode = ImportLDIF.mainImportLDIF(import_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- if(retCode == expCode)
- {
- if(startOpenDS(dsee_home, hostname, port, bindDN, bindPW, logDir) != 0)
- {
- retCode = 999;
- }
- }
- compareExitCode(retCode, expCode);
- }
-
-/**
- * First verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests9.testImport9" })
- public void testImport9_check(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 9 check entries 1");
- String base = "uid=trigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest9check1.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 0;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Second verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests9.testImport9_check" })
- public void testImport9_check2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 9 check entries 2");
- String base = "uid=prigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest9check2.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-/**
- * Third verification search for the entries that were imported in the last test.
- *
- * @param hostname The hostname for the server where OpenDS
- * is installed.
- * @param port The port number for OpenDS.
- * @param bindDN The bind DN.
- * @param bindPW The password for the bind DN.
- * @param integration_test_home The home directory for the Integration
- * Test Suites.
- * @param logDir The directory for the log files that are
- * generated during the Integration Tests.
-*/
- @Parameters({ "hostname", "port", "bindDN", "bindPW", "integration_test_home", "logDir" })
- @Test(alwaysRun=true, dependsOnMethods = { "org.opends.server.integration.backend.ImportTests9.testImport9_check2" })
- public void testImport9_check3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception
- {
- System.out.println("*********************************************");
- System.out.println("Import Test 9 check entries 3");
- String base = "uid=brigden9, ou=People, o=test one, o=import tests, dc=example,dc=com";
- String search_args[] = {"-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-b", base, "objectclass=*"};
-
- ds_output.redirectOutput(logDir, "ImportTest9check3.txt");
- int retCode = LDAPSearch.mainSearch(search_args);
- ds_output.resetOutput();
- int expCode = 32;
-
- compareExitCode(retCode, expCode);
- }
-
-}
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTasksTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTasksTests.java
index 6006f5e..f9f5a4b 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTasksTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTasksTests.java
@@ -33,12 +33,35 @@
import java.util.GregorianCalendar;
import java.io.*;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Restore Tasks Tests
+ #@TestSuitePurpose Test the restore tasks functionality for OpenDS
+ #@TestSuiteID Restore Tasks Tests
+ #@TestSuiteGroup Restore Tasks
+ #@TestGroup Backend
+ #@TestScript RestoreTasksTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for restore
*/
@Test
public class RestoreTasksTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Restore Tasks Tests
+ #@TestName Restore Tasks 1
+ #@TestID RestoreTasks1
+ #@TestPreamble
+ #@TestSteps An ldif file is created that describes the restore task to be
+ scheduled. The task is scheduled by adding the ldif file
+ with the static method, LDAPModify.mainModify().
+ #@TestPostamble
+ #@TestResult Success if OpenDS returns 0
+*/
/**
* Restore data in OpenDS by scheduling a task.
*
diff --git a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTests.java b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTests.java
index 936fa4c..5b37bf1 100644
--- a/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTests.java
+++ b/opends/tests/integration-tests-testng/src/server/org/opends/server/integration/backend/RestoreTests.java
@@ -32,12 +32,35 @@
import java.util.Calendar;
import java.util.GregorianCalendar;
+/*
+ Place suite-specific test information here.
+ #@TestSuiteName Backend Restore Tests
+ #@TestSuitePurpose Test the restore functionality for OpenDS
+ #@TestSuiteID Restore Tests
+ #@TestSuiteGroup Restore
+ #@TestGroup Backend
+ #@TestScript RestoreTests.java
+ #@TestHTMLLink
+*/
/**
* This class contains the TestNG tests for the Backend functional tests for restore
*/
@Test
public class RestoreTests extends BackendTests
{
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Restore Tests
+ #@TestName Restore 1
+ #@TestID Restore1
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method RestoreDB.mainRestoreDB()
+ with the parameters, --configClass, --configFileHandler,
+ and --backupDirectory.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if RestoreDB.mainRestoreDB() returns 0
+*/
/**
* Restore data to OpenDS.
*
@@ -80,6 +103,19 @@
compareExitCode(retCode, expCode);
}
+/*
+ Place test-specific test information here.
+ The tag, TestMarker, must be present and must be the same as the marker, TestSuiteName.
+ #@TestMarker Backend Restore Tests
+ #@TestName Restore 2
+ #@TestID Restore2
+ #@TestPreamble The OpenDS is stopped.
+ #@TestSteps Client calls static method RestoreDB.mainRestoreDB()
+ with the parameters, --configClass, --configFileHandler,
+ --backupDirectory, --isCompressed.
+ #@TestPostamble The OpenDs is started.
+ #@TestResult Success if RestoreDB.mainRestoreDB() returns 0
+*/
/**
* Restore compressed data to OpenDS.
*
--
Gitblit v1.10.0