diff --git a/Rakefile b/Rakefile index 4e14ed0..c01138f 100644 --- a/Rakefile +++ b/Rakefile @@ -3,3 +3,11 @@ if !File.exist?('.ssh_config') end require 'chake' + +task :test do + Dir.glob('test/*_test.sh').each do |t| + sh 'sh', t + end +end + +task :default => :test diff --git a/test/colab_test.sh b/test/colab_test.sh new file mode 100644 index 0000000..5c9c367 --- /dev/null +++ b/test/colab_test.sh @@ -0,0 +1,11 @@ +. $(dirname $0)/test_helper.sh + +test_colab_config_is_in_place() { + assertTrue 'colab settings.yml is in place' 'run_on colab test -f /etc/colab/settings.yml' +} + +test_colab_installed_and_running() { + assertTrue 'colab service running' 'run_on colab pgrep -fa colab.wsgi' +} + +. shunit2 diff --git a/test/test_helper.sh b/test/test_helper.sh new file mode 100644 index 0000000..e7c80f3 --- /dev/null +++ b/test/test_helper.sh @@ -0,0 +1,5 @@ +run_on() { + local vm="$1" + shift + vagrant ssh "$vm" -- "$@" +} -- libgit2 0.21.2