Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
test for whether PostGIS was actually installed
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Jun 9, 2014
1 parent e8307c1 commit 4203064
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source 'https://rubygems.org'
gem 'berkshelf'
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'busser-serverspec'

# Uncomment these lines if you want to live on the Edge:
#
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ GEM
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
buff-ruby_engine (~> 0.1.0)
busser (0.6.0)
thor
busser-serverspec (0.2.6)
busser
celluloid (0.16.0.pre)
timers (~> 2.0.0)
celluloid-io (0.16.0.pre)
Expand Down Expand Up @@ -102,5 +106,6 @@ PLATFORMS

DEPENDENCIES
berkshelf
busser-serverspec
kitchen-vagrant
test-kitchen
15 changes: 15 additions & 0 deletions test/integration/default/serverspec/postgis_extension_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'spec_helper'

describe "PostGIS Extension" do
get_postgis_version =<<-CMD
su - postgres -c 'psql --user postgres -d template_postgis -c "select PostGIS_Full_Version();"'
CMD

describe command(get_postgis_version) do
it { should return_exit_status 0 }
end

describe command(get_postgis_version) do
it { should return_stdout(/POSTGIS=/) }
end
end
9 changes: 9 additions & 0 deletions test/integration/default/serverspec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'serverspec'
require 'pathname'
require 'net/ssh'

include SpecInfra::Helper::Exec

RSpec.configure do |c|
end

0 comments on commit 4203064

Please sign in to comment.