From 702508745682c29cb3f9959b7c22d535b767459f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Nov 2010 17:19:55 +1100 Subject: [PATCH] wintest: cope with the heimdal version of kinit Autobuild-User: Andrew Tridgell Autobuild-Date: Mon Nov 29 08:49:36 CET 2010 on sn-devel-104 --- wintest/test-s4-howto.py | 3 ++- wintest/wintest.py | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index ae0dc1437a5..8f57553929b 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -239,7 +239,8 @@ def test_kerberos(t): t.info("Testing kerberos") t.run_cmd("kdestroy") t.kinit("administrator@${REALM}", "${PASSWORD1}") - t.cmd_contains("klist -e", ["Ticket cache", "Default principal", "Valid starting"]) + # this copes with the differences between MIT and Heimdal klist + t.cmd_contains("klist", ["rincipal", "administrator@${REALM}"]) def test_dyndns(t): diff --git a/wintest/wintest.py b/wintest/wintest.py index effc77e95ef..67af51a313b 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -453,11 +453,13 @@ class wintest(): if len(s) > 0: s[1] = s[1].upper() username = '@'.join(s) - child = self.pexpect_spawn('kinit -V ' + username) - child.expect("Password for") + child = self.pexpect_spawn('kinit ' + username) + child.expect("Password") child.sendline(password) - child.expect("Authenticated to Kerberos") - + child.expect(pexpect.EOF) + child.close() + if child.exitstatus != 0: + raise RuntimeError("kinit failed with status %d" % child.exitstatus) def get_domains(self): '''return a dictionary of DNS domains and IPs for named.conf''' -- 2.34.1