From: Andrew Bartlett Date: Fri, 18 Jun 2021 11:48:26 +0000 (+1200) Subject: testprogs/blackbox: Remove joined dc for ldapcmp X-Git-Tag: tevent-0.11.0~264 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbff4f5e6bb7b6c50b2b4a87bb1ad143b9f14958;p=thirdparty%2Fsamba.git testprogs/blackbox: Remove joined dc for ldapcmp We don't need this DC once the ldapcmp is over, and it avoids the running DC spamming the logs looking for it. Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/testprogs/blackbox/join_ldapcmp.sh b/testprogs/blackbox/join_ldapcmp.sh index 30d3e1e0192..e55a71007da 100755 --- a/testprogs/blackbox/join_ldapcmp.sh +++ b/testprogs/blackbox/join_ldapcmp.sh @@ -19,6 +19,11 @@ join_dc() { $SAMBA_TOOL domain join $REALM dc $JOIN_ARGS --option="netbios name = TESTJOINDC" } +demote_joined_dc() { + DEMOTE_ARGS="--remove-other-dead-server=TESTJOINDC --server=$SERVER -U$USERNAME%$PASSWORD" + $SAMBA_TOOL domain demote $DEMOTE_ARGS +} + ldapcmp_result() { DB1_PATH="tdb://$PREFIX_ABS/$SERVER/private/sam.ldb" DB2_PATH="tdb://$TARGET_DIR/private/sam.ldb" @@ -36,6 +41,8 @@ testit "check_dc_join" join_dc # check resulting DB matches server DC testit "new_db_matches" ldapcmp_result +testit "demote_joined_dc" demote_joined_dc + cleanup_output_dir exit $failed