tests: check whether ocserv is build with oath support prior to running otp tests

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
Nikos Mavrogiannopoulos
2018-02-25 16:03:33 +01:00
parent 66f9f97d1d
commit 86ae99864b
2 changed files with 10 additions and 0 deletions

View File

@@ -29,6 +29,11 @@ OTP_FILE=test-otp.$$.tmp
echo "Testing local backend with username-password-otp and certificate... " echo "Testing local backend with username-password-otp and certificate... "
$SERV --version 2>&1|grep oath >/dev/null 2>&1
if [ $? != 0 ];then
exit 77
fi
#user 'test' has cert, password + OTP #user 'test' has cert, password + OTP
#user 'testuser' has cert and OTP only #user 'testuser' has cert and OTP only

View File

@@ -32,6 +32,11 @@ echo "Testing local backend with username-password-otp and certificate... "
#user 'test' has cert, password + OTP #user 'test' has cert, password + OTP
#user 'testuser' has cert and OTP only #user 'testuser' has cert and OTP only
$SERV --version 2>&1|grep oath >/dev/null 2>&1
if [ $? != 0 ];then
exit 77
fi
rm -f ${OTP_FILE} rm -f ${OTP_FILE}
cp data/test-otp.oath ${OTP_FILE} cp data/test-otp.oath ${OTP_FILE}
update_config test-otp-cert.config update_config test-otp-cert.config