/* * 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.bob; import static org.testng.Assert.*; import org.testng.annotations.*; import org.opends.server.tools.*; import java.io.*; /* Place suite-specific test information here. #@TestSuiteName Bob Modify Tests #@TestSuitePurpose Test the modify functionality for OpenDS #@TestSuiteID Modify Tests #@TestSuiteGroup Bob #@TestGroup Bob #@TestScript BobModTests.java #@TestHTMLLink */ /** * This class contains the TestNG tests for the Bob modifies. */ @Test public class BobModTests extends BobTests { /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 1 #@TestID BobModify1 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a small jpeg photo in an existing entry. * * @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.bob.BobAddTests.testBobAdd56" }) public void testBobMod1(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 1"); String datafile = integration_test_home + "/bob/data/mod/bin_a1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest1.txt"); int retCode = LDAPModify.mainModify(bob_args); ds_output.resetOutput(); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 2 #@TestID BobModify2 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a large jpeg photo in an existing entry. * * @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.bob.BobModTests.testBobMod1" }) public void testBobMod2(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 2"); String datafile = integration_test_home + "/bob/data/mod/bin_a2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest2.txt"); int retCode = LDAPModify.mainModify(bob_args); ds_output.resetOutput(); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 3 #@TestID BobModify3 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a small jpeg photo in each of five existing entries. * * @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.bob.BobModTests.testBobMod2" }) public void testBobMod3(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 3"); String datafile = integration_test_home + "/bob/data/mod/bin_c1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest3.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 4 #@TestID BobModify4 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a large jpeg photo in each of five existing entries. * * @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.bob.BobModTests.testBobMod3" }) public void testBobMod4(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 4"); String datafile = integration_test_home + "/bob/data/mod/bin_c2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest4.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 5 #@TestID BobModify5 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short lableduri in an existing entry. * * @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.bob.BobModTests.testBobMod4" }) public void testBobMod5(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 5"); String datafile = integration_test_home + "/bob/data/mod/ces_a1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest5.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 6 #@TestID BobModify6 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long lableduri in an existing entry. * * @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.bob.BobModTests.testBobMod5" }) public void testBobMod6(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 6"); String datafile = integration_test_home + "/bob/data/mod/ces_a2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest6.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 7 #@TestID BobModify7 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short labeleduri in each of five existing entries. * * @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.bob.BobModTests.testBobMod6" }) public void testBobMod7(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 7"); String datafile = integration_test_home + "/bob/data/mod/ces_c1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest7.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 8 #@TestID BobModify8 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long labeleduri in each of five existing entries. * * @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.bob.BobModTests.testBobMod7" }) public void testBobMod8(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 8"); String datafile = integration_test_home + "/bob/data/mod/ces_c2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest8.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 9 #@TestID BobModify9 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short description in an existing entry. * * @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.bob.BobModTests.testBobMod8" }) public void testBobMod9(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 9"); String datafile = integration_test_home + "/bob/data/mod/cis_a1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest9.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 10 #@TestID BobModify10 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long description in an existing entry. * * @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.bob.BobModTests.testBobMod9" }) public void testBobMod10(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 10"); String datafile = integration_test_home + "/bob/data/mod/cis_a2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest10.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 11 #@TestID BobModify11 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short description in each of five existing entries. * * @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.bob.BobModTests.testBobMod10" }) public void testBobMod11(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 11"); String datafile = integration_test_home + "/bob/data/mod/cis_c1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest11.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 12 #@TestID BobModify12 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long description in each of five existing entries. * * @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.bob.BobModTests.testBobMod11" }) public void testBobMod12(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 12"); String datafile = integration_test_home + "/bob/data/mod/cis_c2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest12.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 13 #@TestID BobModify13 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short seeAlso in an existing entry. * * @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.bob.BobModTests.testBobMod12" }) public void testBobMod13(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 13"); String datafile = integration_test_home + "/bob/data/mod/dn_a1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest13.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 14 #@TestID BobModify14 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long seeAlso in an existing entry. * * @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.bob.BobModTests.testBobMod13" }) public void testBobMod14(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 14"); String datafile = integration_test_home + "/bob/data/mod/dn_a2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest14.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 15 #@TestID BobModify15 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short seeAlso in each of five existing entries. * * @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.bob.BobModTests.testBobMod14" }) public void testBobMod15(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 15"); String datafile = integration_test_home + "/bob/data/mod/dn_c1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest15.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 16 #@TestID BobModify16 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long seeAlso in each of five existing entries. * * @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.bob.BobModTests.testBobMod15" }) public void testBobMod16(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 16"); String datafile = integration_test_home + "/bob/data/mod/dn_c2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest16.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 17 #@TestID BobModify17 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short pager number in an existing entry. * * @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.bob.BobModTests.testBobMod16" }) public void testBobMod17(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 17"); String datafile = integration_test_home + "/bob/data/mod/tel_a1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest17.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 18 #@TestID BobModify18 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long pager number in an existing entry. * * @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.bob.BobModTests.testBobMod17" }) public void testBobMod18(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 18"); String datafile = integration_test_home + "/bob/data/mod/tel_a2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest18.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 19 #@TestID BobModify19 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a short pager number in each of five existing entries. * * @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.bob.BobModTests.testBobMod18" }) public void testBobMod19(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 19"); String datafile = integration_test_home + "/bob/data/mod/tel_c1_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest19.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 20 #@TestID BobModify20 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a long pager number in each of five existing entries. * * @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.bob.BobModTests.testBobMod19" }) public void testBobMod20(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 20"); String datafile = integration_test_home + "/bob/data/mod/tel_c2_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest20.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 21 #@TestID BobModify21 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a jpeg photo attribute with no value to an existing entry. * * @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.bob.BobModTests.testBobMod20" }) public void testBobMod21(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 21"); String datafile = integration_test_home + "/bob/data/mod/bin_a3_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest21.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 22 #@TestID BobModify22 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a jpeg photo attribute with an ascii value to an existing entry. * * @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.bob.BobModTests.testBobMod21" }) public void testBobMod22(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 22"); String datafile = integration_test_home + "/bob/data/mod/bin_a4_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest22.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 23 #@TestID BobModify23 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a jpeg photo attribute which is in ascii format but has a * null value to an existing entry. * * @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.bob.BobModTests.testBobMod22" }) public void testBobMod23(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 23"); String datafile = integration_test_home + "/bob/data/mod/bin_c3_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest23.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 24 #@TestID BobModify24 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a jpeg photo attribute with an extra large photo to an existing entry * * @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.bob.BobModTests.testBobMod23" }) public void testBobMod24(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 24"); String datafile = integration_test_home + "/bob/data/mod/bin_c4_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest24.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 25 #@TestID BobModify25 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 21 */ /** * Replace a description that has no value. * * @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.bob.BobModTests.testBobMod24" }) public void testBobMod25(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 25"); String datafile = integration_test_home + "/bob/data/mod/cis_a3_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest25.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 21; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 26 #@TestID BobModify26 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 1 */ /** * Replace a description that has a binary value. * * @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.bob.BobModTests.testBobMod25" }) public void testBobMod26(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 26"); String datafile = integration_test_home + "/bob/data/mod/cis_a4_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest26.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 1; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 27 #@TestID BobModify27 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 0 */ /** * Replace a description that has a variety of different punctuation. * * @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.bob.BobModTests.testBobMod26" }) public void testBobMod27(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 27"); String datafile = integration_test_home + "/bob/data/mod/cis_c3_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest27.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 0; compareExitCode(retCode, expCode); } /* Place test-specific test information here. The tag, TestMarker, be the same as the marker, TestSuiteName. #@TestMarker Bob Modify Tests #@TestName Bob Modify 28 #@TestID BobModify28 #@TestPreamble #@TestSteps Client calls static method LDAPModify.mainModify() with the filename to the appropriate ldif file. #@TestPostamble #@TestResult Success if OpenDS returns 1 */ /** * Replace the description of each of five existing entries, but the * fourth entry has the description in binary format. * * @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.bob.BobModTests.testBobMod27" }) public void testBobMod28(String hostname, String port, String bindDN, String bindPW, String integration_test_home, String logDir) throws Exception { System.out.println("*********************************************"); System.out.println("Bob Modify test 28"); String datafile = integration_test_home + "/bob/data/mod/cis_c4_mod.ldif"; String bob_args[] = {"-a", "-h", hostname, "-p", port, "-D", bindDN, "-w", bindPW, "-f", datafile}; ds_output.redirectOutput(logDir, "BobModTest28.txt"); int retCode = LDAPModify.mainModify(bob_args); int expCode = 1; compareExitCode(retCode, expCode); } }