Commit 1b3ff5cbf61e7742719bc117ca314c55bbcc00d3

Authored by Antonio Terceiro
1 parent 8219905f

util/debian-install: add some simple tests

util/debian-install/Vagrantfile
... ... @@ -27,4 +27,5 @@ end
27 27 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
28 28 config.vm.box = "debian-wheezy"
29 29 config.vm.provision :shell, path: 'install'
  30 + config.vm.provision :shell, path: 'test'
30 31 end
... ...
util/debian-install/install
1 1 #!/bin/sh
2 2  
3 3 set -e
4   -sudo apt-get install -qy netcat-traditional
  4 +sudo apt-get install -qy netcat-traditional shunit2
5 5  
6 6 # apt-cacher-ng running on the host
7 7 # 10.0.2.2 = host ip on virtualbox/qemu
... ...
util/debian-install/test 0 → 100755
... ... @@ -0,0 +1,11 @@
  1 +#!/bin/sh
  2 +
  3 +test_noosfero_running() {
  4 + assertTrue 'Noosfero running' 'pgrep -u noosfero -f thin'
  5 +}
  6 +
  7 +test_noosfero_responds() {
  8 + assertTrue 'Noosfero responds' 'curl --fail http://localhost/'
  9 +}
  10 +
  11 +. shunit2
... ...