summaryrefslogtreecommitdiffstats
path: root/wintest/wintest.py
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-29 19:03:34 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-01 16:09:58 +1100
commitf5382d5d3f8c6483eecc04d11bf88dcd50d624dd (patch)
treec0ea6dcac335a6c556aa23b20316c4c47b2f0b99 /wintest/wintest.py
parentb0ed6c2b6f7d3424c8bdae496714d30f9bad6d99 (diff)
downloadsamba-f5382d5d3f8c6483eecc04d11bf88dcd50d624dd.tar.gz
samba-f5382d5d3f8c6483eecc04d11bf88dcd50d624dd.tar.xz
samba-f5382d5d3f8c6483eecc04d11bf88dcd50d624dd.zip
wintest Add automatic dcpromo is the host isn't a DC yet
This is slow, and requires an extra reboot, but should be consistent and reproducible. Andrew Bartlett
Diffstat (limited to 'wintest/wintest.py')
-rw-r--r--wintest/wintest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 201ed089e2a..e295c52f9fc 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -332,6 +332,16 @@ class wintest():
self.setvar('WIN_DEFAULT_GATEWAY', child.after)
child.expect("C:")
+ def get_is_dc(self, child):
+ child.sendline("dcdiag")
+ i = child.expect(["is not a Directory Server", "Home Server = "])
+ if i == 0:
+ return False
+ child.expect('[\S]+')
+ hostname = child.after
+ if hostname.upper() == self.getvar("WIN_HOSTNAME").upper:
+ return True
+
def run_tlntadmn(self, child):
'''remove the annoying telnet restrictions'''
child.sendline('tlntadmn config maxconn=1024')