From 5d650a123e46c0c86fe3e440fc9dbf04cd831fc9 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 15 Jun 2011 15:51:32 +0000
Subject: [PATCH] Tidy up unit-tests so that not all backends are always enabled, and replication related databases are deleted after tests.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index ed41bf4..c1c5a4e 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2011 ForgeRock AS
  */
 package org.opends.server;
 
@@ -1947,4 +1948,16 @@
 
     return buffer.toString();
   }
+  
+  public static void enableBackend(String backendID)
+  {
+    dsconfig("set-backend-prop", "--backend-name", backendID,
+             "--set", "enabled:true");
+  }
+  
+  public static void disableBackend(String backendID)
+  {
+    dsconfig("set-backend-prop", "--backend-name", backendID,
+             "--set", "enabled:false");
+  }
 }

--
Gitblit v1.10.0