From 738bf70d921471e9fce48fe37fcc15d951081253 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 19 Jul 2007 08:55:15 +0000
Subject: [PATCH] Add support for deregistering relations from managed object definitions and use it in unit tests for better cleanup after tests have completed (previously admin framework unit tests were leaving mock relations registered with the root configuration).

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DNBuilderTest.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DNBuilderTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DNBuilderTest.java
index 1f1c6c7..8668350 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DNBuilderTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/admin/server/DNBuilderTest.java
@@ -78,6 +78,7 @@
   @AfterClass
   public void tearDown() {
     LDAPProfile.getInstance().popWrapper();
+    TestCfg.cleanup();
   }
 
 
@@ -95,7 +96,7 @@
     ManagedObjectPath<? extends ConfigurationClient, ? extends Configuration> path = ManagedObjectPath
         .emptyPath();
 
-    path = path.child(TestCfg.RD_TEST_ONE_TO_MANY_PARENT, "test-parent-1");
+    path = path.child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
     path = path.child(TestParentCfgDefn.getInstance()
         .getTestChildrenRelationDefinition(), "test-child-1");
 
@@ -143,7 +144,7 @@
 
     };
 
-    path = path.child(TestCfg.RD_TEST_ONE_TO_MANY_PARENT, "test-parent-1");
+    path = path.child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
     path = path.child(r2);
 
     // Now serialize it.
@@ -176,7 +177,7 @@
     ManagedObjectPath<? extends ConfigurationClient, ? extends Configuration> path = ManagedObjectPath
         .emptyPath();
 
-    path = path.child(TestCfg.RD_TEST_ONE_TO_MANY_PARENT, "test-parent-1");
+    path = path.child(TestCfg.getTestOneToManyParentRelationDefinition(), "test-parent-1");
     path = path.child(TestParentCfgDefn.getInstance()
         .getOptionalTestChildRelationDefinition());
 

--
Gitblit v1.10.0