From 81418ac3dea77db5b51e6cf65615b532fa069c16 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 06 Aug 2007 18:13:25 +0000
Subject: [PATCH] Implement a TestCaseUtils.dsconfig method that provides a more convenient mechanism for making configuration changes within the unit test framework.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AllowedTaskTestCase.java | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AllowedTaskTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AllowedTaskTestCase.java
index 6afad5a..b92f95e 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AllowedTaskTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/tasks/AllowedTaskTestCase.java
@@ -102,16 +102,9 @@
// Update the set of allowed tasks to include the dummy task.
- args = new String[]
- {
- "-h", "127.0.0.1",
- "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
- "-D", "cn=Directory Manager",
- "-w", "password",
+ TestCaseUtils.dsconfig(
"set-global-configuration-prop",
- "--add", "allowed-task:org.opends.server.tasks.DummyTask"
- };
- assertEquals(DSConfig.main(args, false, System.out, System.err), 0);
+ "--add", "allowed-task:org.opends.server.tasks.DummyTask");
// Now verify that we can add the task and have it complete successfully.
@@ -143,16 +136,9 @@
// Remove the task class from the set of allowed tasks and verify that we
// can no longer schedule the task.
- args = new String[]
- {
- "-h", "127.0.0.1",
- "-p", String.valueOf(TestCaseUtils.getServerLdapPort()),
- "-D", "cn=Directory Manager",
- "-w", "password",
+ TestCaseUtils.dsconfig(
"set-global-configuration-prop",
- "--remove", "allowed-task:org.opends.server.tasks.DummyTask"
- };
- assertEquals(DSConfig.main(args, false, System.out, System.err), 0);
+ "--remove", "allowed-task:org.opends.server.tasks.DummyTask");
// Now verify that we can add the task and have it complete successfully.
--
Gitblit v1.10.0