(tests) Makes tstclnt tests passing again

This commit is contained in:
Henry Case 2018-02-16 00:49:40 +00:00 committed by Henry Dorsett Case
parent adeb1a5868
commit 58e1a66838

View File

@ -45,21 +45,22 @@ elif [ "$1" = "RUN-CLIENT" ]; then
# RUN-CLIENT <target-server> # RUN-CLIENT <target-server>
cd "$(dirname "$0")/tris-testclient" cd "$(dirname "$0")/tris-testclient"
servername="$2-localserver" SERVERNAME="$2-localserver"
docker run --rm --detach --name "$servername" \ docker run --rm --detach --name "$SERVERNAME" \
--entrypoint /server.sh \ --entrypoint /server.sh \
--expose 1443 --expose 2443 --expose 6443 \ --expose 1443 --expose 2443 --expose 6443 \
tls-tris:$2 tls-tris:$2
IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "$servername") IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' "$SERVERNAME")
# Obtain information and stop server on exit # Obtain information and stop server on exit
trap 'docker ps -a; docker logs "$servername"; docker kill "$servername"' EXIT trap 'docker ps -a; docker logs "$SERVERNAME"; docker kill "$SERVERNAME"' EXIT
# RSA # RSA
docker run --rm tris-testclient -ecdsa=false $IP:1443 docker run --rm tris-testclient -ecdsa=false $IP:1443
# ECDSA # ECDSA
docker run --rm tris-testclient -rsa=false $IP:2443 docker run --rm tris-testclient -rsa=false $IP:2443
# Test client authentication if requested # Test client authentication if requested
[[ $3 =~ .*C.* ]] && docker run --rm tris-testclient -rsa=false -cliauth $IP:6443 [[ $3 =~ .*C.* ]] && docker run --rm tris-testclient -rsa=false -cliauth $IP:6443; true
# TODO maybe check server logs for expected output? # TODO maybe check server logs for expected output?
fi fi