From 46723aa2da81742995950ca3c6f403e081c5ba05 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 7 Nov 2011 15:24:01 +1100 Subject: s4-test: improved error checking in samba-tool time test Pair-Programmed-With: Amitay Isaacs --- source4/scripting/python/samba/tests/samba_tool/timecmd.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/tests/samba_tool/timecmd.py b/source4/scripting/python/samba/tests/samba_tool/timecmd.py index 8eb96ae874..b9946f8f56 100644 --- a/source4/scripting/python/samba/tests/samba_tool/timecmd.py +++ b/source4/scripting/python/samba/tests/samba_tool/timecmd.py @@ -40,4 +40,6 @@ class TimeCmdTestCase(SambaToolCmdTest): def test_timefail(self): """Run time against a non-existant server, and make sure it fails""" (result, out, err) = self.runcmd("time", "notaserver") + self.assertEquals(result, -1, "check for result code") + self.assertTrue(err.strip().endswith("NT_STATUS_OBJECT_NAME_NOT_FOUND"), "ensure right error string") self.assertEquals(out, "", "ensure no output returned") -- cgit