tests: make test-pass-script pass with new openconnect

The new versions (7.07+) do not automatically send a bogus hostname,
they require the --local-hostname parameter to be passed.

Resolves #80
This commit is contained in:
Nikos Mavrogiannopoulos
2016-12-16 09:37:40 +01:00
parent d3370cccd0
commit b18cd67917

View File

@@ -43,11 +43,11 @@ rm -f ${builddir}/host-update.ok
#test special characters
echo "Connecting to obtain cookie... "
( echo "!@#$%^&*()<>" | $OPENCONNECT -q localhost:$PORT -u sp@c/al --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) ||
( echo "!@#$%^&*()<>" | $OPENCONNECT -q localhost:$PORT -u "sp@c/al" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly >/dev/null 2>&1 ) ||
fail $PID "Could not receive cookie from server"
echo "Re-connecting to force script run... "
echo "!@#$%^&*()<>" | timeout 7 $OPENCONNECT -q localhost:$PORT -u "sp@c/al" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 -s /bin/true #>/dev/null 2>&1
echo "!@#$%^&*()<>" | timeout 7 $OPENCONNECT -q --local-hostname='mylocalname' localhost:$PORT -u "sp@c/al" --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 -s /bin/true #>/dev/null 2>&1
kill $PID
wait