tests:samba_tool_drs: test samba-tool drs replicate with implicit machine credentials
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 06:29:39 +0000 (08:29 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 08:06:11 +0000 (10:06 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@samba.org>
python/samba/tests/blackbox/samba_tool_drs.py

index afaa4afb869f4300dd199451338d22662c912f96..27d3885e6ced8185d04b937a16df8d16ed3f6b07 100644 (file)
@@ -137,7 +137,7 @@ class SambaToolDrsTests(samba.tests.BlackboxTestCase):
         self.assertTrue("Replicate from" in out)
         self.assertTrue("was successful" in out)
 
-    def test_samba_tool_replicate_machine_creds(self):
+    def test_samba_tool_replicate_machine_creds_P(self):
         """Tests 'samba-tool drs replicate -P' command with machine creds."""
 
         # Output should be like 'Replicate from <DC-SRC> to <DC-DEST> was successful.'
@@ -148,6 +148,17 @@ class SambaToolDrsTests(samba.tests.BlackboxTestCase):
         self.assertTrue("Replicate from" in out)
         self.assertTrue("was successful" in out)
 
+    def test_samba_tool_replicate_machine_creds(self):
+        """Tests 'samba-tool drs replicate' command with implicit machine creds."""
+
+        # Output should be like 'Replicate from <DC-SRC> to <DC-DEST> was successful.'
+        nc_name = self._get_rootDSE(self.dc1)["defaultNamingContext"]
+        out = self.check_output("samba-tool drs replicate %s %s %s" % (self.dc1,
+                                                                       self.dc2,
+                                                                       nc_name))
+        self.assertTrue("Replicate from" in out)
+        self.assertTrue("was successful" in out)
+
     def test_samba_tool_drs_clone_dc(self):
         """Tests 'samba-tool drs clone-dc-database' command."""
         server_rootdse = self._get_rootDSE(self.dc1)