[Fedora-directory-commits] dsgw/tests setup.sh,1.3,1.4
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Tue Feb 19 15:20:24 UTC 2008
- Previous message: [Fedora-directory-commits] dsgw dbtdsgw.h, 1.1.1.1, 1.2 dnedit.c, 1.3, 1.4 domodify.c, 1.2, 1.3 dsgw.h, 1.6, 1.7 dsgwutil.c, 1.8, 1.9 edit.c, 1.3, 1.4 entrydisplay.c, 1.5, 1.6 htmlout.c, 1.2, 1.3 ldaputil.c, 1.2, 1.3
- Next message: [Fedora-directory-commits] dsgw/tests/csearch testpost.1, NONE, 1.1 testpost.10, NONE, 1.1 testpost.11, NONE, 1.1 testpost.12, NONE, 1.1 testpost.13, NONE, 1.1 testpost.14, NONE, 1.1 testpost.15, NONE, 1.1 testpost.2, NONE, 1.1 testpost.3, NONE, 1.1 testpost.4, NONE, 1.1 testpost.5, NONE, 1.1 testpost.6, NONE, 1.1 testpost.7, NONE, 1.1 testpost.8, NONE, 1.1 testpost.9, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rmeggins
Update of /cvs/dirsec/dsgw/tests
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23811/dsgw/tests
Modified Files:
setup.sh
Log Message:
1) The old code used a CGI variable called completion_javascript - this variable contained arbitrary javascript code that was eval'd on in the client browser. I have removed this code and put it in the resource file. The dsgw code will set completion_javascript to one of the 3 keywords, and the new function emit_completion_javascript will look up the code in the resource file and output it with any required arguments. It just seems like a really bad idea to execute arbitrary blobs of javascript passed in a CGI argument.
2) Make the checking for the template file names stricter.
3) Added many new tests.
4) When removing unused or duplicate LDAP Mods, if we remove the last one, just free the entire array.
Index: setup.sh
===================================================================
RCS file: /cvs/dirsec/dsgw/tests/setup.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- setup.sh 9 Feb 2008 18:24:23 -0000 1.3
+++ setup.sh 19 Feb 2008 15:20:22 -0000 1.4
@@ -1,14 +1,14 @@
#!/bin/sh
testdir="$1"
-sroot=/home/$USER/11srv
+sroot=/NotBackedUp/$USER/11srv
port=1100
secport=1101
rootdn="cn=directory manager"
-rootpw=password
+rootpw=secret12
adminpw=admin
#needinstance=1
-#needdata=1
+needdata=1
#usessl=1
PATH=/usr/lib64/mozldap:/usr/lib/mozldap:$PATH
export PATH
@@ -32,7 +32,7 @@
fi
if [ "$needdata" ] ; then
-$sroot/lib/dirsrv/slapd-localhost/ldif2db.pl -D "$rootdn" -w "$rootpw" -n userRoot -i $testdir/nsroot.ldif
+$sroot/lib/dirsrv/slapd-localhost/ldif2db.pl -D "$rootdn" -w "$rootpw" -n userRoot -i $sroot/share/dirsrv/data/Example.ldif
sleep 10
fi
@@ -40,7 +40,7 @@
mkdir testtmp
if [ "$usessl" ] ; then
- ldapurl="ldaps://$hostname:$secport/$suffix"
+ ldapurl="ldaps://$hostname:$secport"
# grab CA cert
certutil -L -d $sroot/etc/dirsrv/$inst -n "CA certificate" -a > testtmp/cacert.asc
# pin file
@@ -51,7 +51,7 @@
certutil -A -d testtmp -n "CA certificate" -t "CT,," -a -i testtmp/cacert.asc
port=$secport
else
- ldapurl="ldap://localhost:$port/$suffix"
+ ldapurl="ldap://localhost:$port"
hostname=localhost
fi
@@ -88,21 +88,21 @@
pwpfile=/tmp/pwp.$$
cat > $pwpfile <<EOF
-User: admin
-Password: $adminpw
+User: directory manager
+Password: $rootpw
-UserDN: uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot
-SIEPWD: $adminpw
+UserDN: cn=directory manager
+SIEPWD: $rootpw
EOF
#VGPREFIX="valgrind --tool=memcheck --leak-check=yes --suppressions=$HOME/valgrind.supp --num-callers=40 --suppressions=$testdir/valgrind.supp "
# These are CGI programs - they assume they will run for a very short period of time - they use exit() instead of free() :P
VGPREFIX="valgrind --tool=memcheck --leak-check=no --suppressions=$HOME/valgrind.supp --num-callers=40 --suppressions=$testdir/valgrind.supp "
-GDB="gdb -x .gdbinit "
+#GDB="gdb -x .gdbinit "
DEBUGCMD=VALGRIND
#DEBUGCMD="$GDB"
-PROGS="domodify"
+PROGS="dnedit"
# use scripts for orgchart perl scripts
SCRIPTS=""
@@ -186,15 +186,15 @@
prog="$1" # test must be in dir of same name
shift
getlist=/tmp/gettests.$$
- find $testdir/$prog -name testget.\* -print 2> /dev/null | sort -n > $getlist
+ find $testdir/$prog -name skip -prune -o -name testget.\* -print 2> /dev/null | sort -n > $getlist
for test in `cat $getlist` ; do
runATest "$prog" GET "$test"
ctxnum=1
for ctx in "" "/" "." "../../../" "somebogusvalue" "pb" "dsgw" ; do
if [ -s "$test" ] ; then
- runATest "$prog" GET "$test" .$ctxnum "&context=$ctx"
+ runATest "$prog" GET "$test" .$ctxnum "&context=$ctx&binddn=$rootdn&passwd=$rootpw"
else
- runATest "$prog" GET "$test" .$ctxnum "context=$ctx"
+ runATest "$prog" GET "$test" .$ctxnum "context=$ctx&binddn=$rootdn&passwd=$rootpw"
fi
ctxnum=`expr $ctxnum + 1`
done
@@ -206,12 +206,12 @@
prog="$1" # test must be in dir of same name
shift
postlist=/tmp/posttests.$$
- find $testdir/$prog -name testpost.\* -print 2> /dev/null | sort -n > $postlist
+ find $testdir/$prog -name skip -prune -o -name testpost.\* -print 2> /dev/null | sort -n > $postlist
for test in `cat $postlist` ; do
runATest "$prog" POST "$test"
ctxnum=1
for ctx in "" "/" "." "../../../" "somebogusvalue" "pb" "dsgw" ; do
- runATest "$prog" POST "$test" .$ctxnum "&context=$ctx"
+ runATest "$prog" POST "$test" .$ctxnum "&context=$ctx&binddn=$rootdn&passwd=$rootpw"
ctxnum=`expr $ctxnum + 1`
done
done
- Previous message: [Fedora-directory-commits] dsgw dbtdsgw.h, 1.1.1.1, 1.2 dnedit.c, 1.3, 1.4 domodify.c, 1.2, 1.3 dsgw.h, 1.6, 1.7 dsgwutil.c, 1.8, 1.9 edit.c, 1.3, 1.4 entrydisplay.c, 1.5, 1.6 htmlout.c, 1.2, 1.3 ldaputil.c, 1.2, 1.3
- Next message: [Fedora-directory-commits] dsgw/tests/csearch testpost.1, NONE, 1.1 testpost.10, NONE, 1.1 testpost.11, NONE, 1.1 testpost.12, NONE, 1.1 testpost.13, NONE, 1.1 testpost.14, NONE, 1.1 testpost.15, NONE, 1.1 testpost.2, NONE, 1.1 testpost.3, NONE, 1.1 testpost.4, NONE, 1.1 testpost.5, NONE, 1.1 testpost.6, NONE, 1.1 testpost.7, NONE, 1.1 testpost.8, NONE, 1.1 testpost.9, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the 389-commits
mailing list