Skip to content

Commit df80ea5

Browse files
committed
otp: Disable confirmation in non-interactive mode
* This would hang the tests.
1 parent a26aa01 commit df80ea5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/ovpn_otp_user

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ if [ "$2" == "interactive" ]; then
2828
# Always use time base OTP otherwise storage for counters must be configured somewhere in volume
2929
google-authenticator --time-based --force -l "${1}@${OVPN_CN}" -s /etc/openvpn/otp/${1}.google_authenticator
3030
else
31+
# Skip confirmation if not running in interctive mode. Essential for integration tests.
3132
google-authenticator --time-based --disallow-reuse --force --rate-limit=3 --rate-time=30 --window-size=3 \
32-
-l "${1}@${OVPN_CN}" -s /etc/openvpn/otp/${1}.google_authenticator
33-
fi
33+
-l "${1}@${OVPN_CN}" -s /etc/openvpn/otp/${1}.google_authenticator --no-confirm
34+
fi

0 commit comments

Comments
 (0)