1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-02 23:05:46 +00:00

Added SSL/HTTPS tests

This commit is contained in:
Steve Kamerman
2016-04-20 12:20:08 -04:00
parent f294582ae8
commit 1d0a5d9194
4 changed files with 178 additions and 0 deletions

View File

@ -74,6 +74,23 @@ function curl_container {
http://$(docker_ip $container)${path}
}
# Send a HTTPS request to container $1 for path $2 and
# Additional curl options can be passed as $@
#
# $1 container name
# $2 HTTPS path to query
# $@ additional options to pass to the curl command
function curl_container_https {
local -r container=$1
local -r path=$2
shift 2
docker run --label bats-type="curl" appropriate/curl --silent \
--connect-timeout 5 \
--max-time 20 \
--insecure \
"$@" \
https://$(docker_ip $container)${path}
}
# start a container running (one or multiple) webservers listening on given ports
#