]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selfest: add test for non-local offlinejoin provision
authorGünther Deschner <gd@samba.org>
Mon, 13 Jan 2025 19:26:01 +0000 (20:26 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 30 Jan 2025 06:32:37 +0000 (06:32 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15777

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
testprogs/blackbox/test_net_offline.sh

index d885b337cea558af1cc206ae28dc651089352dfa..e5b57e5431a672b0c7c3e7aacd8ce9396ac7c396 100755 (executable)
@@ -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)