testprogs: remove used records in "net ads dns" tests
authorBjörn Baumbach <bb@sernet.de>
Fri, 24 Feb 2023 15:52:05 +0000 (16:52 +0100)
committerBjörn Baumbach <bb@sernet.de>
Fri, 3 Mar 2023 11:58:34 +0000 (11:58 +0000)
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
testprogs/blackbox/test_net_ads_dns.sh

index 0fa29accae1b98b152ac0e1889a3ee7e74b4ef7f..5fc735183a9c1334951d11211f89610896a2321d 100755 (executable)
@@ -126,6 +126,9 @@ testit_expect_failure "Unprivileged users should not be able to modify existing
 testit "We should be able to unregister the name $UNPRIVNAME.$REALM $IPADDRESS" \
        $VALGRIND $net_tool ads dns unregister $UNPRIVNAME.$REALM -U$UNPRIVUSER%$UNPRIVPASS ||
        failed=$(expr $failed + 1)
+testit "We should be able to unregister the name $MACHINENAME.$REALM $IPADDRESS" \
+       $VALGRIND $net_tool ads dns unregister $MACHINENAME.$REALM -P ||
+       failed=$(expr $failed + 1)
 
 # Remove the unprivileged user, which is not required anymore
 $VALGRIND $net_tool user delete $UNPRIVUSER -U$DC_USERNAME%$DC_PASSWORD
@@ -142,5 +145,17 @@ testit_grep_count \
        0 \
        dig @$SERVER +short -t aaaa $UNPRIVNAME.$REALM ||
        failed=$(expr $failed + 1)
+testit_grep_count \
+       "The name $MACHINENAME.$REALM ($IPADDRESS) should not be there any longer" \
+       "$IPADDRESS" \
+       0 \
+       dig @$SERVER +short -t a $MACHINENAME.$REALM ||
+       failed=$(expr $failed + 1)
+testit_grep_count \
+       "The name $MACHINENAME.$REALM ($IP6ADDRESS) should not be there any longer" \
+       "$IP6ADDRESS" \
+       0 \
+       dig @$SERVER +short -t aaaa $MACHINENAME.$REALM ||
+       failed=$(expr $failed + 1)
 
 exit $failed