testprogs: remove only used dns records in "net ads dns" tests
authorBjörn Baumbach <bb@sernet.de>
Fri, 24 Feb 2023 15:35:02 +0000 (16:35 +0100)
committerBjörn Baumbach <bb@sernet.de>
Fri, 3 Mar 2023 11:58:34 +0000 (11:58 +0000)
$NAME was not added here in this section, but $UNPRIV.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
testprogs/blackbox/test_net_ads_dns.sh

index d2d1dec94259e258edcce6fb0214d25232cb2764..c3dd28b5fc73cb3a4da7fedf57b876f79afeb6f3 100755 (executable)
@@ -114,22 +114,24 @@ testit_grep_count \
 #Unprivileged users should not be able to overwrite other's names
 testit_expect_failure "Unprivileged users should not be able to modify existing names" $net_tool ads dns register membername.$REALM $UNPRIVIP -U$UNPRIVUSER%$UNPRIVPASS || failed=$(expr $failed + 1)
 
-testit "We should be able to unregister the name $NAME.$REALM $IPADDRESS" $VALGRIND $net_tool ads dns unregister $NAME.$REALM -P || failed=$(expr $failed + 1)
+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)
 
 # Remove the unprivileged user, which is not required anymore
 $VALGRIND $net_tool user delete $UNPRIVUSER -U$DC_USERNAME%$DC_PASSWORD
 
 testit_grep_count \
-       "The name $NAME.$REALM ($IPADDRESS) should not be there any longer" \
+       "The name $UNPRIVNAME.$REALM ($IPADDRESS) should not be there any longer" \
        "$IPADDRESS" \
        0 \
-       dig @$SERVER +short -t a $NAME.$REALM ||
+       dig @$SERVER +short -t a $UNPRIVNAME.$REALM ||
        failed=$(expr $failed + 1)
 testit_grep_count \
-       "The name $NAME.$REALM ($IP6ADDRESS) should not be there any longer" \
+       "The name $UNPRIVNAME.$REALM ($IP6ADDRESS) should not be there any longer" \
        "$IP6ADDRESS" \
        0 \
-       dig @$SERVER +short -t aaaa $NAME.$REALM ||
+       dig @$SERVER +short -t aaaa $UNPRIVNAME.$REALM ||
        failed=$(expr $failed + 1)
 
 exit $failed