From ffd05c988e762634216c718f7b3bab68d3f99a78 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 11 Oct 2022 14:06:46 +0100 Subject: [PATCH] ITS#9931 test079: fix ldapsearch invocations --- tests/scripts/test079-proxy-timeout | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/scripts/test079-proxy-timeout b/tests/scripts/test079-proxy-timeout index 6a8e0c7a80..d64449b97c 100755 --- a/tests/scripts/test079-proxy-timeout +++ b/tests/scripts/test079-proxy-timeout @@ -139,10 +139,10 @@ fi echo "Checking that proxy has created connections towards backend (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 0 ; then echo "Error: LDAP connection to remote LDAP server is not found ($RC)" @@ -150,10 +150,10 @@ if test $RC != 0 ; then exit $RC fi -$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 0 ; then echo "Error: LDAP connection to remote LDAP server is not found ($RC)" @@ -171,10 +171,10 @@ sleep `expr $CONN_EXPIRES - $NOW + 2` echo "Checking that proxy has closed expired connections towards the remote LDAP server (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 1 ; then echo "Error: LDAP connection to remote LDAP server was not closed" @@ -182,10 +182,10 @@ if test $RC != 1 ; then exit $RC fi -$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 1 ; then echo "Error: LDAP connection to remote LDAP server was not closed" @@ -235,10 +235,10 @@ sleep 2 echo "Checking that proxy has created connections towards backend (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 0 ; then echo "Error: LDAP connection to remote LDAP server is not found ($RC)" @@ -246,10 +246,10 @@ if test $RC != 0 ; then exit $RC fi -$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 0 ; then echo "Error: LDAP connection to remote LDAP server is not found ($RC)" @@ -267,10 +267,10 @@ sleep `expr $CONN_EXPIRES - $NOW + 2` echo "Checking that proxy has closed expired connections towards the remote LDAP server (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 1 ; then echo "Error: LDAP connection to remote LDAP server was not closed" @@ -278,10 +278,10 @@ if test $RC != 1 ; then exit $RC fi -$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 3,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 1 ; then echo "Error: LDAP connection to remote LDAP server was not closed" @@ -339,10 +339,10 @@ fi NOW=`date +%s` sleep `expr $CONN_EXPIRES - $NOW - 2` echo "Check that connection is still alive due to idle-timeout reset (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 0 ; then echo "Error: LDAP connection to remote LDAP server is not found ($RC)" @@ -354,10 +354,10 @@ fi NOW=`date +%s` sleep `expr $CONN_EXPIRES - $NOW + 2` echo "Check that connection is closed after extended idle-timeout has passed (time_t now=`date +%s`)" -$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL olmDbConnURI \ +$LDAPSEARCH -b "cn=Connections,cn=database 2,cn=databases,cn=monitor" -s one -LLL \ -D "cn=Manager,dc=local,dc=com" \ - -H $URI2 \ - -w $PASSWD 2>&1 | tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null + -H $URI2 -w $PASSWD olmDbConnURI 2>&1 | \ + tee -a $TESTOUT | grep ldap://${LOCALHOST}:$PORT1 >/dev/null RC=$? if test $RC != 1 ; then echo "Error: LDAP connection to remote LDAP server was not closed" -- 2.47.2