From 3aeade3bd20749181194fa30ed18d1f58acc42d3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 23 Nov 2005 10:47:27 +0000 Subject: [PATCH] fix return attributes (ITS#4203) --- tests/data/proxycache.out | 23 +++++++++++------------ tests/scripts/test020-proxycache | 4 +++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/data/proxycache.out b/tests/data/proxycache.out index c2e2337e85..b52e6e3c4d 100644 --- a/tests/data/proxycache.out +++ b/tests/data/proxycache.out @@ -1,3 +1,5 @@ +# Query 1: filter:(sn=Jon) attrs: all +# Query 2: filter:(|(cn=*Jon*)(sn=Jon*)) attrs:cn sn title uid dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com cn: James A Jones 1 cn: James Jones @@ -8,7 +10,6 @@ title: Mad Cow Researcher, UM Alumni Association dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example ,dc=com -objectClass: OpenLDAPperson cn: James A Jones 2 cn: James Jones cn: Jim Jones @@ -17,13 +18,13 @@ uid: jjones title: Senior Manager, Information Technology Division dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: John Doe cn: Jonathon Doe sn: Doe uid: johnd title: System Administrator, Information Technology Division +# Query 3: filter:(sn=Smith*) attrs:cn sn title uid dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com cn: Jennifer Smith cn: Jen Smith @@ -31,6 +32,7 @@ sn: Smith uid: jen title: Telemarketer, UM Alumni Association +# Query 4: filter:(sn=Doe*) attrs:cn sn title uid dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example ,dc=com cn: James A Jones 2 @@ -41,7 +43,6 @@ uid: jjones title: Senior Manager, Information Technology Division dn: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: Jane Doe cn: Jane Alverson sn: Doe @@ -49,13 +50,13 @@ uid: jdoe title: Programmer Analyst, UM Alumni Association dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: John Doe cn: Jonathon Doe sn: Doe uid: johnd title: System Administrator, Information Technology Division +# Query 5: filter:(uid=bjorn) attrs:mail postaladdress telephonenumber cn uid dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc =com cn: Bjorn Jensen @@ -65,6 +66,7 @@ postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103 mail: bjorn@mailgw.example.com telephoneNumber: +1 313 555 0355 +# Query 6: filter:(mail=*@mail.alumni.example.com) cn sn title uid dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com cn: Dorothy Stevens cn: Dot Stevens @@ -73,41 +75,34 @@ uid: dots title: Secretary, UM Alumni Association dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: James A Jones 1 cn: James Jones cn: Jim Jones sn: Jones uid: jaj title: Mad Cow Researcher, UM Alumni Association -mail: jaj@mail.alumni.example.com dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: Jennifer Smith cn: Jen Smith sn: Smith uid: jen title: Telemarketer, UM Alumni Association -mail: jen@mail.alumni.example.com dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: Mark Elliot cn: Mark A Elliot sn: Elliot uid: melliot title: Director, UM Alumni Association -mail: melliot@mail.alumni.example.com dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com -objectClass: OpenLDAPperson cn: Ursula Hampster sn: Hampster uid: uham title: Secretary, UM Alumni Association -mail: uham@mail.alumni.example.com +# Query 7: filter:(mail=*) cn sn title uid dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example, dc=com cn: Barbara Jensen @@ -182,6 +177,7 @@ sn: Hampster uid: uham title: Secretary, UM Alumni Association +# Query 8: filter:(|(cn=*Jones)(sn=Jones)) attrs:cn sn title uid dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com cn: James A Jones 1 cn: James Jones @@ -199,6 +195,7 @@ sn: Doe uid: jjones title: Senior Manager, Information Technology Division +# Query 9: filter:(sn=Smith) attrs:cn sn title uid dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com cn: Jennifer Smith cn: Jen Smith @@ -206,6 +203,7 @@ sn: Smith uid: jen title: Telemarketer, UM Alumni Association +# Query 10: filter:(uid=bjorn) attrs:mail postaladdress telephonenumber cn uid dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc =com cn: Bjorn Jensen @@ -215,6 +213,7 @@ postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103 mail: bjorn@mailgw.example.com telephoneNumber: +1 313 555 0355 +# Query 11: filter:(mail=jaj@mail.alumni.example.com) cn sn title uid dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com cn: James A Jones 1 cn: James Jones diff --git a/tests/scripts/test020-proxycache b/tests/scripts/test020-proxycache index 5b4c6e27aa..5775a43361 100755 --- a/tests/scripts/test020-proxycache +++ b/tests/scripts/test020-proxycache @@ -292,8 +292,10 @@ fi echo "Filtering ldapsearch results..." . $LDIFFILTER < $SLAVEOUT > $SEARCHFLT +echo "Filtering original ldif..." +. $LDIFFILTER < $PROXYCACHEOUT > $LDIFFLT echo "Comparing filter output..." -$CMP $SEARCHFLT $PROXYCACHEOUT > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "Comparison failed" -- 2.39.5