s3:smbd: use new function cluster_probe_ok()
[mat/samba.git] / wintest / test-s3.py
index 8ea1ade690f4020c3d1d030f3da76fba7c9cf0b8..e6dbfc75f1f57c1cacc99c6c1219cc8ee0aaea3b 100755 (executable)
@@ -43,7 +43,7 @@ def start_s3(t):
 def test_wbinfo(t):
     t.info('Testing wbinfo')
     t.chdir('${PREFIX}')
-    t.cmd_contains("bin/wbinfo --version", ["Version 3."])
+    t.cmd_contains("bin/wbinfo --version", ["Version 4."])
     t.cmd_contains("bin/wbinfo -p", ["Ping to winbindd succeeded"])
     t.retry_cmd("bin/wbinfo --online-status",
                 ["BUILTIN : online",
@@ -70,14 +70,18 @@ def test_wbinfo(t):
                 ["plaintext password authentication succeeded",
                  "challenge/response password authentication succeeded"])
 
+    t.retry_cmd("bin/wbinfo --krb5auth=${WIN_DOMAIN}/administrator%${WIN_PASS}",
+                ["succeeded"])
+
 
 def test_smbclient(t):
     t.info('Testing smbclient')
+    smbclient = t.getvar("smbclient")
     t.chdir('${PREFIX}')
-    t.cmd_contains("bin/smbclient --version", ["Version 3."])
-    t.cmd_contains('bin/smbclient -L ${INTERFACE_IP} -U%', ["Domain=[${WIN_DOMAIN}]", "test", "IPC$", "Samba 3."],
+    t.cmd_contains("%s --version" % (smbclient), ["Version 4."])
+    t.cmd_contains('%s -L ${INTERFACE_IP} -U%%' % (smbclient), ["Domain=[${WIN_DOMAIN}]", "test", "IPC$", "Samba 4."],
                    casefold=True)
-    child = t.pexpect_spawn('bin/smbclient //${HOSTNAME}.${WIN_REALM}/test -Uroot@${WIN_REALM}%${PASSWORD2}')
+    child = t.pexpect_spawn('%s //${HOSTNAME}.${WIN_REALM}/test -Uroot@${WIN_REALM}%%${PASSWORD2}' % (smbclient))
     child.expect("smb:")
     child.sendline("dir")
     child.expect("blocks available")
@@ -88,7 +92,7 @@ def test_smbclient(t):
     child.sendline("cd ..")
     child.sendline("rmdir testdir")
 
-    child = t.pexpect_spawn('bin/smbclient //${HOSTNAME}.${WIN_REALM}/test -Uroot@${WIN_REALM}%${PASSWORD2} -k')
+    child = t.pexpect_spawn('%s //${HOSTNAME}.${WIN_REALM}/test -Uroot@${WIN_REALM}%%${PASSWORD2} -k' % (smbclient))
     child.expect("smb:")
     child.sendline("dir")
     child.expect("blocks available")
@@ -182,7 +186,8 @@ def test_join_as_member(t, vm):
 def test_s3(t):
     '''basic s3 testing'''
 
-    t.setvar("SAMBA_VERSION", "Version 3")
+    t.setvar("SAMBA_VERSION", "Version 4")
+    t.setvar("smbclient", "bin/smbclient")
     t.check_prerequesites()
     set_libpath(t)