diff --git a/test/colab_test.sh b/test/colab_test.sh
index 14048e2..adc0e82 100644
--- a/test/colab_test.sh
+++ b/test/colab_test.sh
@@ -21,8 +21,7 @@ test_nginx_responds() {
}
test_nginx_virtualhost() {
- local ip="$(grep integration: nodes.yaml | cut -d : -f 2)"
- local title="$(./test/bin/curl http://$ip/dashboard | grep '
' | sed -e 's/^\s*//')"
+ local title="$(./test/bin/curl http://$integration/dashboard | grep '' | sed -e 's/^\s*//')"
assertEquals "Home - Colab" "$title"
}
diff --git a/test/test_helper.sh b/test/test_helper.sh
index 165c963..b60fbe4 100644
--- a/test/test_helper.sh
+++ b/test/test_helper.sh
@@ -5,3 +5,13 @@ run_on() {
}
curl=/vagrant/test/bin/curl
+
+# make IP addresses avaliable at the environment so we can refer to hosts by
+# name, e.g.
+#
+# curl http://$reverseproxy
+# nmap -p 5423 $database
+#
+# Each node in the `peers:` entry in nodes.yaml will have its own variable
+#
+eval $(ruby -ryaml -e 'YAML.load_file("nodes.yaml").first[1]["peers"].each { |k,v| puts "#{k}=#{v}" }')
--
libgit2 0.21.2