Commit b50c135a92eeab7b445530ec66a44264a61b1ba6
1 parent
51e49fee
Exists in
master
and in
90 other branches
Fix tests
that --header 'Host: [...]' gets messed up by vagrant ssh, so let's encapsulate all the common curl options we want to use all the time into a single curl wrapper in test/bin/curl
Showing
3 changed files
with
18 additions
and
3 deletions
Show diff stats
test/colab_test.sh
... | ... | @@ -13,16 +13,16 @@ test_colab_running() { |
13 | 13 | } |
14 | 14 | |
15 | 15 | test_colab_responds() { |
16 | - assertTrue 'colab responds' 'run_on integration curl --fail http://localhost:8001' | |
16 | + assertTrue 'colab responds' "run_on integration $curl http://localhost:8001" | |
17 | 17 | } |
18 | 18 | |
19 | 19 | test_nginx_responds() { |
20 | - assertTrue 'nginx reponds' 'run_on integration curl --fail http://localhost' | |
20 | + assertTrue 'nginx reponds' "run_on integration $curl http://localhost" | |
21 | 21 | } |
22 | 22 | |
23 | 23 | test_nginx_virtualhost() { |
24 | 24 | local ip="$(grep integration: nodes.yaml | cut -d : -f 2)" |
25 | - local title="$(curl --silent --header 'Host: beta.softwarepublico.gov.br' http://$ip/dashboard | grep '<title>' | sed -e 's/^\s*//')" | |
25 | + local title="$(./test/bin/curl http://$ip/dashboard | grep '<title>' | sed -e 's/^\s*//')" | |
26 | 26 | assertEquals "<title>Home - Colab</title>" "$title" |
27 | 27 | } |
28 | 28 | ... | ... |
test/test_helper.sh