From 4f9f60d5d3c2402f56f10cb877016a5cf0d5e152 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Fri, 30 May 2003 21:43:03 +0000 Subject: [PATCH] add the context prefix entry first in the test script 017/018 --- tests/data/test-ordered-cp.ldif | 17 ++ tests/data/test-ordered-nocp.ldif | 274 ++++++++++++++++++ tests/scripts/defines.sh | 2 + tests/scripts/test017-syncreplication-refresh | 30 +- tests/scripts/test018-syncreplication-persist | 30 +- 5 files changed, 333 insertions(+), 20 deletions(-) create mode 100644 tests/data/test-ordered-cp.ldif create mode 100644 tests/data/test-ordered-nocp.ldif diff --git a/tests/data/test-ordered-cp.ldif b/tests/data/test-ordered-cp.ldif new file mode 100644 index 0000000000..3cbe2ec327 --- /dev/null +++ b/tests/data/test-ordered-cp.ldif @@ -0,0 +1,17 @@ +#LEAD COMMENT +dn: o=University of Michigan,c=US +#EMBEDDED COMMENT +objectclass: organization +objectclass: domainRelatedObject +l: Ann Arbor, Michigan +st: Michigan +o: University of Michigan +o: UMICH +o: UM +o: U-M +o: U of M +description: The University of Michigan at Ann Arbor +postaladdress: University of Michigan $ 535 W. William St. $ Ann Arbor, MI 481 + 09 $ US +telephonenumber: +1 313 764-1817 +associateddomain: example.com diff --git a/tests/data/test-ordered-nocp.ldif b/tests/data/test-ordered-nocp.ldif new file mode 100644 index 0000000000..2564e878a1 --- /dev/null +++ b/tests/data/test-ordered-nocp.ldif @@ -0,0 +1,274 @@ +#LEAD COMMENT +dn: ou=People,o=University of Michigan,c=US +#EMBEDDED COMMENT +objectclass: organizationalUnit +ou: People + +dn: ou=Groups,o=University of Michigan,c=US +objectclass: organizationalUnit +ou: Groups + +dn: ou=Alumni Association,ou=People,o=University of Michigan,c=US +objectclass: organizationalUnit +ou: Alumni Association + +dn: ou=Information Technology Division,ou=People,o=University of Michigan,c + =US +objectclass: organizationalUnit +ou: Information Technology Division + +dn: cn=All Staff,ou=Groups,o=University of Michigan,c=US +member: cn=Manager,o=University of Michigan,c=US +member: cn=Barbara Jensen,ou=Information Technology Division,ou=People,o=Unive + rsity of Michigan,c=US +member: cn=Jane Doe,ou=Alumni Association,ou=People,o=University of Michigan,c + =US +member: cn=John Doe,ou=Information Technology Division,ou=People,o=University + of Michigan,c=US +member: cn=Mark Elliot,ou=Alumni Association,ou=People,o=University of Michiga + n,c=US +member: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +member: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Univ + ersity of Michigan,c=US +member: cn=Jennifer Smith,ou=Alumni Association,ou=People,o=University of Mich + igan,c=US +member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +member: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +member: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Univers + ity of Michigan,c=US +owner: cn=Manager,o=University of Michigan,c=US +cn: All Staff +description: Everyone in the sample data +objectclass: groupofnames + +dn: cn=Alumni Assoc Staff,ou=Groups,o=University of Michigan,c=US +member: cn=Manager,o=University of Michigan,c=US +member: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +member: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +member: cn=Jane Doe,ou=Alumni Association,ou=People,o=University of Michigan,c + =US +member: cn=Jennifer Smith,ou=Alumni Association,ou=People,o=University of Mich + igan,c=US +member: cn=Mark Elliot,ou=Alumni Association,ou=People,o=University of Michiga + n,c=US +member: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Mic + higan,c=US +owner: cn=Manager,o=University of Michigan,c=US +description: All Alumni Assoc Staff +cn: Alumni Assoc Staff +objectclass: groupofnames + +dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,o=Univer + sity of Michigan,c=US +objectclass: OpenLDAPperson +cn: Barbara Jensen +cn: Babs Jensen +sn:: IEplbnNlbiA= +uid: bjensen +title: Mythical Manager, Research Systems +postaladdress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Ann + Arbor, MI 48103-4943 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +userpassword:: YmplbnNlbg== +mail: bjensen@mailgw.example.com +homepostaladdress: 123 Wesley $ Ann Arbor, MI 48103 +description: Mythical manager of the rsdd unix project +drink: water +homephone: +1 313 555 2333 +pager: +1 313 555 3233 +facsimiletelephonenumber: +1 313 555 2274 +telephonenumber: +1 313 555 9022 + +dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,o=Universi + ty of Michigan,c=US +objectclass: OpenLDAPperson +cn: Bjorn Jensen +cn: Biiff Jensen +sn: Jensen +uid: bjorn +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +userpassword:: Ympvcm4= +homepostaladdress: 19923 Seven Mile Rd. $ South Lyon, MI 49999 +drink: Iced Tea +description: Hiker, biker +title: Director, Embedded Systems +postaladdress: Info Tech Division $ 535 W. William St. $ Ann Arbor, MI 48103 +mail: bjorn@mailgw.example.com +homephone: +1 313 555 5444 +pager: +1 313 555 4474 +facsimiletelephonenumber: +1 313 555 2177 +telephonenumber: +1 313 555 0355 + +dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,o=University of Mich + igan,c=US +objectclass: OpenLDAPperson +cn: Dorothy Stevens +cn: Dot Stevens +sn: Stevens +uid: dots +title: Secretary, UM Alumni Association +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +drink: Lemonade +homepostaladdress: 377 White St. Apt. 3 $ Ann Arbor, MI 48104 +description: Very tall +facsimiletelephonenumber: +1 313 555 3223 +telephonenumber: +1 313 555 3664 +mail: dots@mail.alumni.example.com +homephone: +1 313 555 0454 + +dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US +owner: cn=Manager,o=University of Michigan,c=US +description: All ITD Staff +cn: ITD Staff +objectclass: groupofnames +member: cn=Manager,o=University of Michigan,c=US +member: cn=Bjorn Jensen,OU=Information Technology Division,ou=PEOPLE,o=Univers + ity of Michigan,c=US +member: cn=James A Jones 2,ou=Information Technology Division,ou=PEOPLE,o=Univ + ersity of Michigan,c=US +member: cn=John Doe,ou=Information Technology Division,ou=People,o=University + of Michigan,c=US + +dn: cn=James A Jones 1,ou=Alumni Association,ou=People,o=University of Mich + igan,c=US +objectclass: OpenLDAPperson +cn: James A Jones 1 +cn: James Jones +cn: Jim Jones +sn: Jones +uid: jaj +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +userpassword:: amFq +homepostaladdress: 3882 Beverly Rd. $ Ann Arbor, MI 48105 +homephone: +1 313 555 4772 +description: Outstanding +title: Mad Cow Researcher, UM Alumni Association +pager: +1 313 555 3923 +mail: jaj@mail.alumni.example.com +facsimiletelephonenumber: +1 313 555 4332 +telephonenumber: +1 313 555 0895 + +dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,o=Unive + rsity of Michigan,c=US +objectclass: OpenLDAPperson +cn: James A Jones 2 +cn: James Jones +cn: Jim Jones +sn: Doe +uid: jjones +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +homepostaladdress: 933 Brooks $ Ann Arbor, MI 48104 +homephone: +1 313 555 8838 +title: Senior Manager, Information Technology Division +description: Not around very much +mail: jjones@mailgw.example.com +postaladdress: Info Tech Division $ 535 W William $ Ann Arbor, MI 48103 +pager: +1 313 555 2833 +facsimiletelephonenumber: +1 313 555 8688 +telephonenumber: +1 313 555 7334 + +dn: cn=Jane Doe,ou=Alumni Association,ou=People,o=University of Michigan,c + =US +objectclass: OpenLDAPperson +cn: Jane Doe +cn: Jane Alverson +sn: Doe +uid: jdoe +title: Programmer Analyst, UM Alumni Association +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +homepostaladdress: 123 Anystreet $ Ann Arbor, MI 48104 +drink: diet coke +description: Enthusiastic +mail: jdoe@woof.net +homephone: +1 313 555 5445 +pager: +1 313 555 1220 +facsimiletelephonenumber: +1 313 555 2311 +telephonenumber: +1 313 555 4774 + +dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,o=University of Michi + gan,c=US +objectclass: OpenLDAPperson +cn: Jennifer Smith +cn: Jen Smith +sn: Smith +uid: jen +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +drink: Sam Adams +homepostaladdress: 1000 Maple #44 $ Ann Arbor, MI 48103 +title: Telemarketer, UM Alumni Association +mail: jen@mail.alumni.example.com +homephone: +1 313 555 2333 +pager: +1 313 555 6442 +facsimiletelephonenumber: +1 313 555 2756 +telephonenumber: +1 313 555 8232 + +dn: cn=John Doe,ou=Information Technology Division,ou=People,o=University o + f Michigan,c=US +objectclass: OpenLDAPperson +cn: John Doe +cn: Jonathon Doe +sn: Doe +uid: johnd +postaladdress: ITD $ 535 W. William $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +homepostaladdress: 912 East Bllvd $ Ann Arbor, MI 48104 +title: System Administrator, Information Technology Division +description: overworked! +mail: johnd@mailgw.example.com +homephone: +1 313 555 3774 +pager: +1 313 555 6573 +facsimiletelephonenumber: +1 313 555 4544 +telephonenumber: +1 313 555 9394 + +dn: cn=Manager,o=University of Michigan,c=US +objectclass: person +cn: Manager +cn: Directory Manager +cn: Dir Man +sn: Manager +description: Manager of the directory +userpassword:: c2VjcmV0 + +dn: cn=Mark Elliot,ou=Alumni Association,ou=People,o=University of Michigan + ,c=US +objectclass: OpenLDAPperson +cn: Mark Elliot +cn: Mark A Elliot +sn: Elliot +uid: melliot +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +homepostaladdress: 199 Outer Drive $ Ypsilanti, MI 48198 +homephone: +1 313 555 0388 +drink: Gasoline +title: Director, UM Alumni Association +mail: melliot@mail.alumni.example.com +pager: +1 313 555 7671 +facsimiletelephonenumber: +1 313 555 7762 +telephonenumber: +1 313 555 4177 + +dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,o=University of Mich + igan,c=US +objectclass: OpenLDAPperson +cn: Ursula Hampster +sn: Hampster +uid: uham +title: Secretary, UM Alumni Association +postaladdress: Alumni Association $ 111 Maple St $ Ann Arbor, MI 48109 +seealso: cn=All Staff,ou=Groups,o=University of Michigan,c=US +homepostaladdress: 123 Anystreet $ Ann Arbor, MI 48104 +mail: uham@mail.alumni.example.com +homephone: +1 313 555 8421 +pager: +1 313 555 2844 +facsimiletelephonenumber: +1 313 555 9700 +telephonenumber: +1 313 555 5331 + diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index ddbddf48f9..c45092ccb6 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -68,6 +68,8 @@ SLAVEURI="ldap://${LOCALHOST}:$SLAVEPORT/" LDIF=$DATADIR/test.ldif LDIFGLUED=$DATADIR/test-glued.ldif LDIFORDERED=$DATADIR/test-ordered.ldif +LDIFORDEREDCP=$DATADIR/test-ordered-cp.ldif +LDIFORDEREDNOCP=$DATADIR/test-ordered-nocp.ldif LDIFBASE=$DATADIR/test-base.ldif LDIFPASSWD=$DATADIR/passwd.ldif LDIFPASSWDOUT=$DATADIR/passwd-out.ldif diff --git a/tests/scripts/test017-syncreplication-refresh b/tests/scripts/test017-syncreplication-refresh index 6d392afcce..58ee34235c 100755 --- a/tests/scripts/test017-syncreplication-refresh +++ b/tests/scripts/test017-syncreplication-refresh @@ -42,15 +42,6 @@ fi echo "Waiting 5 seconds to wait for master to start..." sleep 5 -echo "Starting slave slapd on TCP/IP port $SLAVEPORT..." -. $CONFFILTER $BACKEND $MONITORDB < $SRREFSLAVECONF > $REPLCONF -$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 & -SLAVEPID=$! -if test $WAIT != 0 ; then - echo SLAVEPID $SLAVEPID - read foo -fi - echo "Using ldapsearch to check that master slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ @@ -63,6 +54,25 @@ for i in 0 1 2 3 4 5; do sleep 5 done +echo "Using ldapadd to create the context prefix entry in the master..." +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ + $LDIFORDEREDCP > /dev/null 2>&1 +RC=$? +if test $RC != 0 ; then + echo "ldapadd failed ($RC)!" + kill -HUP $PID $SLAVEPID + exit $RC +fi + +echo "Starting slave slapd on TCP/IP port $SLAVEPORT..." +. $CONFFILTER $BACKEND $MONITORDB < $SRREFSLAVECONF > $REPLCONF +$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 & +SLAVEPID=$! +if test $WAIT != 0 ; then + echo SLAVEPID $SLAVEPID + read foo +fi + echo "Using ldapsearch to check that slave slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \ @@ -77,7 +87,7 @@ done echo "Using ldapadd to populate the master directory..." $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ - $LDIFORDERED > /dev/null 2>&1 + $LDIFORDEREDNOCP > /dev/null 2>&1 RC=$? if test $RC != 0 ; then echo "ldapadd failed ($RC)!" diff --git a/tests/scripts/test018-syncreplication-persist b/tests/scripts/test018-syncreplication-persist index 888afd3072..dd91d035fc 100755 --- a/tests/scripts/test018-syncreplication-persist +++ b/tests/scripts/test018-syncreplication-persist @@ -42,15 +42,6 @@ fi echo "Waiting 5 seconds to wait for master to start..." sleep 5 -echo "Starting slave slapd on TCP/IP port $SLAVEPORT..." -. $CONFFILTER $BACKEND $MONITORDB < $SRPERSLAVECONF > $REPLCONF -$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 & -SLAVEPID=$! -if test $WAIT != 0 ; then - echo SLAVEPID $SLAVEPID - read foo -fi - echo "Using ldapsearch to check that master slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \ @@ -63,6 +54,25 @@ for i in 0 1 2 3 4 5; do sleep 5 done +echo "Using ldapadd to create the context prefix entry in the master..." +$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ + $LDIFORDEREDCP > /dev/null 2>&1 +RC=$? +if test $RC != 0 ; then + echo "ldapadd failed ($RC)!" + kill -HUP $PID $SLAVEPID + exit $RC +fi + +echo "Starting slave slapd on TCP/IP port $SLAVEPORT..." +. $CONFFILTER $BACKEND $MONITORDB < $SRPERSLAVECONF > $REPLCONF +$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 & +SLAVEPID=$! +if test $WAIT != 0 ; then + echo SLAVEPID $SLAVEPID + read foo +fi + echo "Using ldapsearch to check that slave slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \ @@ -77,7 +87,7 @@ done echo "Using ldapadd to populate the master directory..." $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \ - $LDIFORDERED > /dev/null 2>&1 + $LDIFORDEREDNOCP > /dev/null 2>&1 RC=$? if test $RC != 0 ; then echo "ldapadd failed ($RC)!" -- 2.39.5