From: Günther Deschner Date: Mon, 13 Jan 2025 19:26:01 +0000 (+0100) Subject: selfest: add test for non-local offlinejoin provision X-Git-Tag: tdb-1.4.13~41 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d4ad4d6824e81ef85dd924d550222dd6a322a15;p=thirdparty%2Fsamba.git selfest: add test for non-local offlinejoin provision BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777 Guenther Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider --- diff --git a/testprogs/blackbox/test_net_offline.sh b/testprogs/blackbox/test_net_offline.sh index d885b337cea..e5b57e5431a 100755 --- a/testprogs/blackbox/test_net_offline.sh +++ b/testprogs/blackbox/test_net_offline.sh @@ -34,6 +34,20 @@ samba_texpect="$BINDIR/texpect" netbios=$(grep "netbios name" $BASEDIR/$WORKDIR/client.conf | cut -f2 -d= | awk '{$1=$1};1') +# 0. Test with machine_name != lp_netbios_name() + +NONLOCALMACHINE=win11 + +testit "provision with non local machine name" \ + ${VALGRIND} ${net_tool} offlinejoin provision domain="${REALM}" machine_name="${NONLOCALMACHINE}" savefile="${ODJFILE}" -U"${DC_USERNAME}%${DC_PASSWORD}" || \ + failed=$((failed + 1)) + +testit "net rpc user delete" \ + ${VALGRIND} ${net_tool} rpc user delete "${NONLOCALMACHINE}$" -U"${DC_USERNAME}%${DC_PASSWORD}" -S "${DC_SERVER}" || \ + failed=$((failed + 1)) + +rm -f "${ODJFILE}" + # 1. Test w/o dcname testit "provision without dcname" $VALGRIND $net_tool offlinejoin provision domain=$REALM machine_name=$netbios savefile=$ODJFILE -U$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1)