Commit f47a7caa9b8d72de1d96d2625b192211df2ade46

Authored by Antonio Terceiro
1 parent 47bdbe0c

Add first bits of a test framework test

Rakefile
... ... @@ -3,3 +3,11 @@ if !File.exist?('.ssh_config')
3 3 end
4 4  
5 5 require 'chake'
  6 +
  7 +task :test do
  8 + Dir.glob('test/*_test.sh').each do |t|
  9 + sh 'sh', t
  10 + end
  11 +end
  12 +
  13 +task :default => :test
... ...
test/colab_test.sh 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +. $(dirname $0)/test_helper.sh
  2 +
  3 +test_colab_config_is_in_place() {
  4 + assertTrue 'colab settings.yml is in place' 'run_on colab test -f /etc/colab/settings.yml'
  5 +}
  6 +
  7 +test_colab_installed_and_running() {
  8 + assertTrue 'colab service running' 'run_on colab pgrep -fa colab.wsgi'
  9 +}
  10 +
  11 +. shunit2
... ...
test/test_helper.sh 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +run_on() {
  2 + local vm="$1"
  3 + shift
  4 + vagrant ssh "$vm" -- "$@"
  5 +}
... ...