s4/drs-tests: Move enable/disable replication methods to DrsBase class so we can...
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 21 Feb 2011 15:49:54 +0000 (17:49 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Sat, 26 Feb 2011 22:23:19 +0000 (00:23 +0200)
source4/torture/drs/python/drs_base.py
source4/torture/drs/python/replica_sync.py

index 56d1ebe79557ff8709f92a506bd0018b4f777a99..8e48b92f7a0805a175511fefe3b07c3e9e6087a2 100644 (file)
@@ -109,3 +109,14 @@ class DrsBaseTestCase(samba.tests.BlackboxTestCase):
         cmd_line = "%s %s %s %s" % (samba_tool_cmdline, DC, fromDC, nc_dn)
         return self.check_output(cmd_line)
 
+    def _enable_inbound_repl(self, DC):
+        # make base command line
+        samba_tool_cmd = self._samba_tool_cmdline("options")
+        # disable replication
+        self.check_run("%s %s --dsa-option=-DISABLE_INBOUND_REPL" %(samba_tool_cmd, DC))
+
+    def _disable_inbound_repl(self, DC):
+        # make base command line
+        samba_tool_cmd = self._samba_tool_cmdline("options")
+        # disable replication
+        self.check_run("%s %s --dsa-option=+DISABLE_INBOUND_REPL" %(samba_tool_cmd, DC))
index 5410ed68b243c887b70f63a505cff5f1f18b9529..06502d60082a41c38d51fee41c72bc7c5e8b6d43 100644 (file)
@@ -58,18 +58,6 @@ class DrsReplicaSyncTestCase(drs_base.DrsBaseTestCase):
         self._enable_inbound_repl(self.dnsname_dc1)
         super(DrsReplicaSyncTestCase, self).tearDown()
 
-    def _enable_inbound_repl(self, DC):
-        # make base command line
-        samba_tool_cmd = self._samba_tool_cmdline("options")
-        # disable replication
-        self.check_run("%s %s --dsa-option=-DISABLE_INBOUND_REPL" %(samba_tool_cmd, DC))
-
-    def _disable_inbound_repl(self, DC):
-        # make base command line
-        samba_tool_cmd = self._samba_tool_cmdline("options")
-        # disable replication
-        self.check_run("%s %s --dsa-option=+DISABLE_INBOUND_REPL" %(samba_tool_cmd, DC))
-
     def test_ReplEnabled(self):
         """Tests we can replicate when replication is enabled"""
         self._enable_inbound_repl(self.dnsname_dc1)