1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

selftest: test listing trusted domains that includes an NT4 domain

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15533

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2024-01-18 17:42:33 +01:00 committed by Stefan Metzmacher
parent 53ca19851d
commit 000bbede59
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1 @@
^samba3.blackbox.list_nt4_trusts.nt4trust_wbinfo_m\(ad_member_idmap_ad\)

View File

@ -1418,6 +1418,7 @@ sub setup_ad_member_idmap_ad
idmap config $dcvars->{TRUST_DOMAIN} : backend = ad
idmap config $dcvars->{TRUST_DOMAIN} : range = 2000000-2999999
gensec_gssapi:requested_life_time = 5
winbind scan trusted domains = yes
";
my $ret = $self->provision(

View File

@ -0,0 +1,25 @@
#!/bin/sh
incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh
. $incdir/common_test_fns.inc
failed=0
wbinfo="$BINDIR/wbinfo"
smbclient="$BINDIR/smbclient"
test_trust_wbinfo_m() {
i=0
# Give the server some time to list trusted domains
while [ $i -lt 10 ] ; do
$wbinfo -m --verbose | grep "SAMBA-TEST" && return 0
sleep 2
i=$((i + 1))
done
return 1
}
testit "nt4trust_wbinfo_m" test_trust_wbinfo_m || failed=$(expr $failed + 1)
testok $0 $failed

View File

@ -1861,6 +1861,10 @@ plantestsuite("samba3.blackbox.nt4_trusts",
"fl2008r2dc",
[os.path.join(samba3srcdir, "script/tests/test_nt4_trust.sh")])
plantestsuite("samba3.blackbox.list_nt4_trusts",
"ad_member_idmap_ad",
[os.path.join(samba3srcdir, "script/tests/test_list_nt4_trust.sh")])
def planclusteredmembertestsuite(tname, prefix):
'''Define a clustered test for the clusteredmember environment'''