From d28252765b6b2ba79913ce2bf92abc5e48d6738e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Jul 2016 08:29:39 +0200 Subject: [PATCH] tests:samba_tool_drs: test samba-tool drs replicate with --async-op Signed-off-by: Stefan Metzmacher Reviewed-by: Garming Sam --- python/samba/tests/blackbox/samba_tool_drs.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/python/samba/tests/blackbox/samba_tool_drs.py b/python/samba/tests/blackbox/samba_tool_drs.py index 27d3885e6ce..90921f4a9be 100644 --- a/python/samba/tests/blackbox/samba_tool_drs.py +++ b/python/samba/tests/blackbox/samba_tool_drs.py @@ -103,6 +103,18 @@ class SambaToolDrsTests(samba.tests.BlackboxTestCase): self.assertTrue("Replicate from" in out) self.assertTrue("was successful" in out) + def test_samba_tool_replicate_async(self): + """Tests 'samba-tool drs replicate --async-op' command.""" + + # Output should be like 'Replicate from to was started.' + nc_name = self._get_rootDSE(self.dc1)["defaultNamingContext"] + out = self.check_output("samba-tool drs replicate --async-op %s %s %s %s" % (self.dc1, + self.dc2, + nc_name, + self.cmdline_creds)) + self.assertTrue("Replicate from" in out) + self.assertTrue("was started" in out) + def test_samba_tool_replicate_local_online(self): """Tests 'samba-tool drs replicate --local-online' command.""" @@ -114,6 +126,17 @@ class SambaToolDrsTests(samba.tests.BlackboxTestCase): self.assertTrue("Replicate from" in out) self.assertTrue("was successful" in out) + def test_samba_tool_replicate_local_online_async(self): + """Tests 'samba-tool drs replicate --local-online --async-op' command.""" + + # Output should be like 'Replicate from to was started.' + nc_name = self._get_rootDSE(self.dc1)["defaultNamingContext"] + out = self.check_output("samba-tool drs replicate --local-online --async-op %s %s %s" % (self.dc1, + self.dc2, + nc_name)) + self.assertTrue("Replicate from" in out) + self.assertTrue("was started" in out) + def test_samba_tool_replicate_local_machine_creds(self): """Tests 'samba-tool drs replicate --local -P' command (uses machine creds).""" -- 2.11.4.GIT