From 323f68acca26fc5d0363a5a556ae4900ad4cc6a1 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 8 Aug 2014 18:27:20 +0100 Subject: Add script to test vagrant vm provisioning - e.g. script/test-vagrant-provisioning squeeze64 --- script/test-vagrant-provisioning | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 script/test-vagrant-provisioning (limited to 'script/test-vagrant-provisioning') diff --git a/script/test-vagrant-provisioning b/script/test-vagrant-provisioning new file mode 100755 index 000000000..62862f3df --- /dev/null +++ b/script/test-vagrant-provisioning @@ -0,0 +1,19 @@ +#!/bin/bash + +OS=$1 + +vagrant destroy + +ALAVETELI_VAGRANT_OS="$OS" vagrant up && + vagrant ssh -c "cd /home/vagrant/alaveteli && bundle exec rails s --daemon" && + sleep 10 && + curl -I http://10.10.10.30:3000 + +if [[ $? -ne 0 ]] +then + echo "Failed with exit code $?" + exit 1 +else + echo "Success!" + exit 0 +fi -- cgit v1.2.3