s4:rpc_server: remove unused dcesrv_connection_context->private_date
[samba.git] / wintest / test-s4-howto.py
index 705f248..5102387 100755 (executable)
@@ -1,9 +1,13 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 '''automated testing of the steps of the Samba4 HOWTO'''
 
-import sys, os
-import wintest, pexpect, time, subprocess
+import sys
+import os
+import wintest
+import pexpect
+import time
+import subprocess
 
 
 def set_krb5_conf(t):
@@ -28,20 +32,20 @@ def provision_s4(t, func_level="2008"):
     t.del_files(["var", "private"])
     t.run_cmd("rm -f etc/smb.conf")
     provision = ['bin/samba-tool',
-               'domain',
-               'provision',
-               '--realm=${LCREALM}',
-               '--domain=${DOMAIN}',
-               '--adminpass=${PASSWORD1}',
-               '--server-role=domain controller',
-               '--function-level=%s' % func_level,
-               '-d${DEBUGLEVEL}',
-               '--option=interfaces=${INTERFACE}',
-               '--host-ip=${INTERFACE_IP}',
-               '--option=bind interfaces only=yes',
-               '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
-               '--dns-backend=${NAMESERVER_BACKEND}',
-               '${DNS_FORWARDER}']
+                 'domain',
+                 'provision',
+                 '--realm=${LCREALM}',
+                 '--domain=${DOMAIN}',
+                 '--adminpass=${PASSWORD1}',
+                 '--server-role=domain controller',
+                 '--function-level=%s' % func_level,
+                 '-d${DEBUGLEVEL}',
+                 '--option=interfaces=${INTERFACE}',
+                 '--host-ip=${INTERFACE_IP}',
+                 '--option=bind interfaces only=yes',
+                 '--option=rndc command=${RNDC} -c${PREFIX}/etc/rndc.conf',
+                 '--dns-backend=${NAMESERVER_BACKEND}',
+                 '${DNS_FORWARDER}']
     if t.getvar('USE_NTVFS'):
         provision.append('${USE_NTVFS}')
 
@@ -217,37 +221,37 @@ def test_dcpromo(t, vm):
 
     t.cmd_contains("bin/samba-tool drs showrepl ${HOSTNAME}.${LCREALM} -k yes",
                    ["INBOUND NEIGHBORS",
-                     "${BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${BASEDN}",  # cope with either order
-                     "Last attempt .* was successful",
-                     "OUTBOUND NEIGHBORS",
-                     "${BASEDN}",
-                     "Last success",
-                     "CN=Configuration,${BASEDN}",
-                     "Last success",
-                     "CN=Configuration,${BASEDN}",
-                     "Last success"],
+                    "${BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${BASEDN}",  # cope with either order
+                    "Last attempt .* was successful",
+                    "OUTBOUND NEIGHBORS",
+                    "${BASEDN}",
+                    "Last success",
+                    "CN=Configuration,${BASEDN}",
+                    "Last success",
+                    "CN=Configuration,${BASEDN}",
+                    "Last success"],
                    ordered=True,
                    regex=True)
 
     t.cmd_contains("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${LCREALM} -k yes",
                    ["INBOUND NEIGHBORS",
-                     "${BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${BASEDN}",
-                     "Last attempt .* was successful",
-                     "OUTBOUND NEIGHBORS",
-                     "${BASEDN}",
-                     "Last success",
-                     "CN=Configuration,${BASEDN}",
-                     "Last success",
-                     "CN=Configuration,${BASEDN}",
-                     "Last success"],
+                    "${BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${BASEDN}",
+                    "Last attempt .* was successful",
+                    "OUTBOUND NEIGHBORS",
+                    "${BASEDN}",
+                    "Last success",
+                    "CN=Configuration,${BASEDN}",
+                    "Last success",
+                    "CN=Configuration,${BASEDN}",
+                    "Last success"],
                    ordered=True,
                    regex=True)
 
@@ -378,13 +382,13 @@ def test_dcpromo_rodc(t, vm):
 
     t.cmd_contains("bin/samba-tool drs showrepl ${HOSTNAME}.${LCREALM}",
                    ["INBOUND NEIGHBORS",
-                     "OUTBOUND NEIGHBORS",
-                     "${BASEDN}",
-                     "Last attempt.*was successful",
-                     "CN=Configuration,${BASEDN}",
-                     "Last attempt.*was successful",
-                     "CN=Configuration,${BASEDN}",
-                     "Last attempt.*was successful"],
+                    "OUTBOUND NEIGHBORS",
+                    "${BASEDN}",
+                    "Last attempt.*was successful",
+                    "CN=Configuration,${BASEDN}",
+                    "Last attempt.*was successful",
+                    "CN=Configuration,${BASEDN}",
+                    "Last attempt.*was successful"],
                    ordered=True,
                    regex=True)
 
@@ -533,13 +537,13 @@ def test_join_as_rodc(t, vm):
 
     t.cmd_contains("bin/samba-tool drs showrepl ${WIN_HOSTNAME}.${WIN_REALM} -k yes",
                    ["INBOUND NEIGHBORS",
-                     "OUTBOUND NEIGHBORS",
-                     "${WIN_BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${WIN_BASEDN}",
-                     "Last attempt .* was successful",
-                     "CN=Configuration,${WIN_BASEDN}",
-                     "Last attempt .* was successful"],
+                    "OUTBOUND NEIGHBORS",
+                    "${WIN_BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${WIN_BASEDN}",
+                    "Last attempt .* was successful",
+                    "CN=Configuration,${WIN_BASEDN}",
+                    "Last attempt .* was successful"],
                    ordered=True,
                    regex=True)