From ad8929fb47e7121d849ae3f238983b93b81d155b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 19 Aug 1998 01:29:52 +0000 Subject: [PATCH] Added filter to populate test --- tests/scripts/acfilter.sh | 5 +++++ tests/scripts/defines.sh | 2 ++ tests/scripts/test002-populate | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 tests/scripts/acfilter.sh diff --git a/tests/scripts/acfilter.sh b/tests/scripts/acfilter.sh new file mode 100755 index 0000000000..11d116d790 --- /dev/null +++ b/tests/scripts/acfilter.sh @@ -0,0 +1,5 @@ +#!/bin/sh +grep -v "modifiersname" | \ +grep -v "modifytimestamp" | \ +grep -v "creatorsname" | \ +grep -v "createtimestamp" diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 3e7e65f12a..cacc155837 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -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 diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate index 62d6923bbc..e3db47ca25 100755 --- a/tests/scripts/test002-populate +++ b/tests/scripts/test002-populate @@ -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 -- 2.39.5