mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 07:30:57 -05:00
Added filter to populate test
This commit is contained in:
parent
70c5050d85
commit
ad8929fb47
3 changed files with 13 additions and 2 deletions
5
tests/scripts/acfilter.sh
Executable file
5
tests/scripts/acfilter.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
grep -v "modifiersname" | \
|
||||
grep -v "modifytimestamp" | \
|
||||
grep -v "creatorsname" | \
|
||||
grep -v "createtimestamp"
|
||||
|
|
@ -24,6 +24,8 @@ MASTERLOG=$DBDIR/master.log
|
|||
SLAVELOG=$DBDIR/slave.log
|
||||
SLURPLOG=$DBDIR/slurp.log
|
||||
SEARCHOUT=$DBDIR/ldapsearch.out
|
||||
SEARCHFLT=$DBDIR/ldapsearch.flt
|
||||
LDIFFLT=$DBDIR/ldif.flt
|
||||
MASTEROUT=$DBDIR/master.out
|
||||
SLAVEOUT=$DBDIR/slave.out
|
||||
TESTOUT=$DBDIR/ldapsearch.out
|
||||
|
|
|
|||
|
|
@ -44,8 +44,12 @@ if [ $RC != 0 ]; then
|
|||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Comparing retrieved entries to LDIF file used to create database"
|
||||
cmp $SEARCHOUT $LDIF
|
||||
echo "Filtering ldapsearch results..."
|
||||
. scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
|
||||
echo "Filtering original ldif used to create database..."
|
||||
. scripts/acfilter.sh < $LDIF > $LDIFFLT
|
||||
echo "Comparing filter output..."
|
||||
cmp $SEARCHFLT $LDIFFLT
|
||||
if [ $? != 0 ]; then
|
||||
echo "comparison failed - database was not created correctly"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue