2 # Does a join against the testenv's DC and then runs ldapcmp on the resulting DB
4 .
`dirname $0`/subunit.sh
6 TARGET_DIR
="$PREFIX_ABS/join_$SERVER"
10 if [ -d $TARGET_DIR ]; then
15 SAMBA_TOOL
="$PYTHON $BINDIR/samba-tool"
18 JOIN_ARGS
="--targetdir=$TARGET_DIR --server=$SERVER -U$USERNAME%$PASSWORD"
19 $SAMBA_TOOL domain
join $REALM dc $JOIN_ARGS --option="netbios name = TESTJOINDC"
23 DB1_PATH
="tdb://$PREFIX_ABS/$SERVER/private/sam.ldb"
24 DB2_PATH
="tdb://$TARGET_DIR/private/sam.ldb"
26 # interSiteTopologyGenerator gets periodically updated. With the restored
27 # testenvs, it can sometimes point to the old/deleted DC object still
28 $SAMBA_TOOL ldapcmp
$DB1_PATH $DB2_PATH --filter=interSiteTopologyGenerator
33 # check that we can join this DC
34 testit
"check_dc_join" join_dc
36 # check resulting DB matches server DC
37 testit
"new_db_matches" ldapcmp_result