From: Douglas Bagnall Date: Wed, 29 May 2019 01:38:12 +0000 (+1200) Subject: tests/samba-tool: test dns serverinfo/zoneinfo X-Git-Tag: ldb-1.5.5~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40ab50754d1db8fc468cad04a0bf737f45895c0f;p=thirdparty%2Fsamba.git tests/samba-tool: test dns serverinfo/zoneinfo BUG: https://bugzilla.samba.org/show_bug.cgi?id=13965 Signed-off-by: Douglas Bagnall Reviewed-by: Noel Power --- diff --git a/python/samba/tests/samba_tool/dnscmd.py b/python/samba/tests/samba_tool/dnscmd.py index 5e882972f46..e1459fee9ac 100644 --- a/python/samba/tests/samba_tool/dnscmd.py +++ b/python/samba/tests/samba_tool/dnscmd.py @@ -883,3 +883,29 @@ class DnsCmdTestCase(SambaToolCmdTest): print(msg) self.fail("Failed to accept valid commands. %d total failures." "Errors above." % num_failures) + + def test_serverinfo(self): + for v in ['w2k', 'dotnet', 'longhorn']: + result, out, err = self.runsubcmd("dns", + "serverinfo", + "--client-version", v, + os.environ["SERVER"], + self.creds_string) + self.assertCmdSuccess(result, + out, + err, + "Failed to print serverinfo with " + "client version %s" % v) + self.assertTrue(out != '') + + def test_zoneinfo(self): + result, out, err = self.runsubcmd("dns", + "zoneinfo", + os.environ["SERVER"], + self.zone, + self.creds_string) + self.assertCmdSuccess(result, + out, + err, + "Failed to print zoneinfo") + self.assertTrue(out != '') diff --git a/selftest/knownfail.d/sambatool-dns b/selftest/knownfail.d/sambatool-dns new file mode 100644 index 00000000000..382d740aa7c --- /dev/null +++ b/selftest/knownfail.d/sambatool-dns @@ -0,0 +1 @@ +samba.tests.samba_tool.dnscmd.samba.tests.samba_tool.dnscmd.DnsCmdTestCase.test_serverinfo