Commit ff7b3a785415dff549c8ebaa0014e482fc83364a
1 parent
91a1d114
Exists in
master
and in
90 other branches
tests: hit the externally available locations
All direct access is now forbidden by the firewall on each host
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
test/colab_test.sh
| ... | ... | @@ -21,16 +21,16 @@ test_nginx_responds() { |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | test_nginx_virtualhost() { |
| 24 | - local title="$(curl --header 'Host: softwarepublico.dev' http://$integration/dashboard | grep '<title>' | sed -e 's/^\s*//')" | |
| 24 | + local title="$(curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/dashboard | grep '<title>' | sed -e 's/^\s*//')" | |
| 25 | 25 | assertEquals "<title>Home - Colab</title>" "$title" |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | test_reverse_proxy_gitlab() { |
| 29 | - assertTrue 'Reverse proxy for gitlab' "curl --header 'Host: softwarepublico.dev' http://$integration/gitlab/public/projects | grep -i '<meta.*gitlab.*>'" | |
| 29 | + assertTrue 'Reverse proxy for gitlab' "curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/gitlab/public/projects | grep -i '<meta.*gitlab.*>'" | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | test_reverse_proxy_noosfero() { |
| 33 | - assertTrue 'Reverse proxy for noosfero' "curl --header 'Host: softwarepublico.dev' http://$integration/social/search/people | grep -i '<meta.*noosfero.*>'" | |
| 33 | + assertTrue 'Reverse proxy for noosfero' "curl --header 'Host: softwarepublico.dev' http://$config_external_hostname/social/search/people | grep -i '<meta.*noosfero.*>'" | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | load_shunit2 | ... | ... |
test/mailman_test.sh
| ... | ... | @@ -21,7 +21,7 @@ test_mailman_delivery() { |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | test_mailman_web_interface() { |
| 24 | - local title="$(curl --location --header 'Host: listas.softwarepublico.dev' http://$integration/mailman/cgi-bin/listinfo | grep -i '<title>')" | |
| 24 | + local title="$(curl --location --header 'Host: listas.softwarepublico.dev' http://$config_external_hostname/mailman/cgi-bin/listinfo | grep -i '<title>')" | |
| 25 | 25 | assertEquals "<TITLE>listas.softwarepublico.dev Mailing Lists</TITLE>" "$title" |
| 26 | 26 | } |
| 27 | 27 | ... | ... |
test/noosfero_test.sh
| ... | ... | @@ -19,12 +19,12 @@ test_reverse_proxy_noosfero() { |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | test_reverse_proxy_static_files() { |
| 22 | - local content_type="$(curl-host softwarepublico.dev --head http://$social/social/images/noosfero-network.png | grep-header Content-Type)" | |
| 22 | + local content_type="$(curl-host softwarepublico.dev --head http://$config_external_hostname/social/images/noosfero-network.png | grep-header Content-Type)" | |
| 23 | 23 | assertEquals "Content-Type: image/png" "$content_type" |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | test_redirect_with_correct_hostname_behind_proxy() { |
| 27 | - local redirect="$(curl-host softwarepublico.dev --head https://softwarepublico.dev/social/search/contents | grep-header Location)" | |
| 27 | + local redirect="$(curl-host softwarepublico.dev --head https://$config_external_hostname/social/search/contents | grep-header Location)" | |
| 28 | 28 | assertEquals "Location: https://softwarepublico.dev/social/search/articles" "$redirect" |
| 29 | 29 | } |
| 30 | 30 | ... | ... |