[Ultrapossum-cvs 1227] ultrapossum/module/test/test.d ...

Back to archive index

Masato Taruishi taru****@users*****
2005年 2月 21日 (月) 13:22:50 JST


===================================================================
RCS file: ultrapossum/module/test/test.d/00protocol,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- ultrapossum/module/test/test.d/00protocol	2004/10/07 05:59:52	1.4
+++ ultrapossum/module/test/test.d/00protocol	2005/02/21 04:22:49	1.4.2.1
@@ -28,6 +28,18 @@
   set -x
 fi
 
+modify()
+{
+  ( for i in 1 2 3 4 5 6 7 8 9 10
+      do
+        $1 -x -w $ROOTPW -D $ROOTDN -h $LDAPMASTER -f $TMPFILE && exit 0
+        sleep $i
+     done
+     exit 1
+  ) || exit 1
+}
+
+
 ########### Add Test
 
 cat >$TMPFILE <<EOF
@@ -38,8 +50,8 @@
 
 EOF
 
-ldapadd -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE
-ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $HOST -b $TESTSUFFIX ou=add | diff -c $TMPFILE -
+modify ldapadd
+ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $LDAPMASTER -b $TESTSUFFIX ou=add | diff -c $TMPFILE -
 
 ############ Modify Test
 
@@ -52,7 +64,7 @@
 sn: people
 EOF
 
-ldapadd -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE
+modify ldapadd
 
 # modify data
 cat >$TMPFILE <<EOF
@@ -62,10 +74,14 @@
 userPassword: new
 EOF
 
-ldapmodify -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE 
-ldapsearch -x -L -b $TESTSUFFIX -h $HOST -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword
+modify ldapmodify
+ldapsearch -x -L -b $TESTSUFFIX -h $LDAPMASTER -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword
 
 ############# Delete Test
 
-ldapdelete -x -h $HOST -w $ROOTPW -D $ROOTDN "ou=add,$TESTSUFFIX" "cn=people,$TESTSUFFIX"
+cat >$TMPFILE <<EOF
+cn=people,$TESTSUFFIX
+EOF
+
+modify ldapdelete
 
===================================================================
RCS file: ultrapossum/module/test/test.d/05replication,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- ultrapossum/module/test/test.d/05replication	2004/10/07 05:59:52	1.4
+++ ultrapossum/module/test/test.d/05replication	2005/02/21 04:22:49	1.4.2.1
@@ -30,6 +30,21 @@
   set -x
 fi
 
+modify()
+{
+
+  ( for i in 1 2 3 4 5 6 7 8 9 10
+    do
+      $1 -x -w $ROOTPW -D $ROOTDN -h $LDAPMASTER -f $TMPFILE && exit 0
+      sleep $i
+    done
+    exit 1
+  ) || exit 1
+
+
+}
+
+
 ########### Add Test
 
 cat >$TMPFILE <<EOF
@@ -40,11 +55,12 @@
 
 EOF
 
-ldapadd -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE
-ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $HOST -b $TESTSUFFIX ou=add | diff -c $TMPFILE -
+modify ldapadd
+
+ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $LDAPMASTER -b $TESTSUFFIX ou=add | diff -c $TMPFILE -
 
 sleep 1
-for host in $SLAVES
+for host in $LDAPHOSTS
 do
   ( for i in 1 2 3 4 5 6 7 8 9 10
   do
@@ -67,7 +83,7 @@
 sn: people
 EOF
 
-ldapadd -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE
+modify ldapadd
 
 # modify data
 cat >$TMPFILE <<EOF
@@ -77,11 +93,11 @@
 userPassword: new
 EOF
 
-ldapmodify -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE 
-ldapsearch -x -L -b $TESTSUFFIX -h $HOST -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword > $TMPFILE
+modify ldapmodify
+ldapsearch -x -L -b $TESTSUFFIX -h $LDAPMASTER -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword > $TMPFILE
 
 sleep 1
-for host in $SLAVES
+for host in $LDAPHOSTS
 do
   ( for i in 1 2 3 4 5 6 7 8 9 10
   do
@@ -96,5 +112,7 @@
 
 
 ############# Protocol Test
-
-ldapdelete -x -h $HOST -w $ROOTPW -D $ROOTDN "ou=add,$TESTSUFFIX" "cn=people,$TESTSUFFIX"
+cat >$TMPFILE <<EOF
+cn=people,$TESTSUFFIX
+EOF
+modify ldapdelete



Ultrapossum-cvs メーリングリストの案内
Back to archive index