diff --git a/test/bin/curl b/test/bin/curl index dd8bf04..d81769d 100755 --- a/test/bin/curl +++ b/test/bin/curl @@ -9,5 +9,6 @@ unset https_proxy --silent \ --noproxy '*' \ --fail \ + --insecure \ --header 'Host: softwarepublico.dev' \ "$@" diff --git a/test/reverse_proxy_test.sh b/test/reverse_proxy_test.sh new file mode 100644 index 0000000..84a36e3 --- /dev/null +++ b/test/reverse_proxy_test.sh @@ -0,0 +1,13 @@ +. $(dirname $0)/test_helper.sh + +test_redirect_http_to_https() { + local redirect="$(./test/bin/curl --head http://$reverseproxy/ | sed -e '/Location:/ !d; s/\r//')" + assertEquals "Location: https://softwarepublico.dev/" "$redirect" +} + +test_reverse_proxy_to_colab() { + local title="$(./test/bin/curl https://$reverseproxy/dashboard | grep '