From 86ae99864bf81f0bca69dcdca59d87d78745239a Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 25 Feb 2018 16:03:33 +0100 Subject: [PATCH] tests: check whether ocserv is build with oath support prior to running otp tests Signed-off-by: Nikos Mavrogiannopoulos --- tests/test-otp | 5 +++++ tests/test-otp-cert | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/test-otp b/tests/test-otp index e9ea83ba..d34b44bd 100755 --- a/tests/test-otp +++ b/tests/test-otp @@ -29,6 +29,11 @@ OTP_FILE=test-otp.$$.tmp 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 'testuser' has cert and OTP only diff --git a/tests/test-otp-cert b/tests/test-otp-cert index 230ecf77..64be7afd 100755 --- a/tests/test-otp-cert +++ b/tests/test-otp-cert @@ -32,6 +32,11 @@ echo "Testing local backend with username-password-otp and certificate... " #user 'test' has cert, password + OTP #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} cp data/test-otp.oath ${OTP_FILE} update_config test-otp-cert.config