Commit 25613b44043c0b917dcb1007997046082babf1d1
1 parent
37a51f8c
Exists in
r5_design
and in
1 other branch
Add tests for the reverse proxy
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
test/bin/curl
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +. $(dirname $0)/test_helper.sh | ||
2 | + | ||
3 | +test_redirect_http_to_https() { | ||
4 | + local redirect="$(./test/bin/curl --head http://$reverseproxy/ | sed -e '/Location:/ !d; s/\r//')" | ||
5 | + assertEquals "Location: https://softwarepublico.dev/" "$redirect" | ||
6 | +} | ||
7 | + | ||
8 | +test_reverse_proxy_to_colab() { | ||
9 | + local title="$(./test/bin/curl https://$reverseproxy/dashboard | grep '<title>' | sed -e 's/^\s*//')" | ||
10 | + assertEquals "<title>Home - Colab</title>" "$title" | ||
11 | +} | ||
12 | + | ||
13 | +. shunit2 |