Add unsupported platforms
This commit is contained in:
parent
b3dbbf604c
commit
29e97e36b9
8 changed files with 27 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'postgresql::client:' do
|
||||
describe 'postgresql::client:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
# Cleanup after tests have ran
|
||||
apply_manifest("class { 'postgresql::client': package_ensure => purged }",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'common patterns:' do
|
||||
describe 'common patterns:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
describe 'postgresql.conf include pattern' do
|
||||
after :all do
|
||||
pp = <<-EOS.unindent
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'postgresql::server::contrib:' do
|
||||
describe 'postgresql::server::contrib:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
# Cleanup after tests have ran, remove both contrib and server as contrib
|
||||
# pulls in the server based packages.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'postgresql_psql:' do
|
||||
describe 'postgresql_psql:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
# Cleanup after tests have ran
|
||||
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'server:' do
|
||||
describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
# Cleanup after tests have ran
|
||||
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
|
||||
|
@ -49,7 +49,7 @@ describe 'server:' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'server without defaults:' do
|
||||
describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
before :all do
|
||||
pp = <<-EOS
|
||||
if($::operatingsystem =~ /Debian|Ubuntu/) {
|
||||
|
@ -153,7 +153,7 @@ describe 'server without defaults:' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'server with firewall:' do
|
||||
describe 'server with firewall:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
|
||||
end
|
||||
|
@ -174,7 +174,7 @@ describe 'server with firewall:' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'server without pg_hba.conf:' do
|
||||
describe 'server without pg_hba.conf:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
after :all do
|
||||
apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true)
|
||||
end
|
||||
|
|
16
spec/acceptance/unsupported_spec.rb
Normal file
16
spec/acceptance/unsupported_spec.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
it 'should fail for client' do
|
||||
pp = <<-EOS
|
||||
class { 'postgresql::client': }
|
||||
EOS
|
||||
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/No preferred version defined or automatically detected/i)
|
||||
end
|
||||
it 'should fail for server' do
|
||||
pp = <<-EOS
|
||||
class { 'postgresql::server': }
|
||||
EOS
|
||||
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/No preferred version defined or automatically detected/i)
|
||||
end
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper_acceptance'
|
||||
|
||||
describe 'postgresql::validate_db_connection:' do
|
||||
describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
before :all do
|
||||
# Setup postgresql server and a sample database for tests to use.
|
||||
pp = <<-EOS.unindent
|
||||
|
|
|
@ -48,6 +48,8 @@ hosts.each do |host|
|
|||
end
|
||||
end
|
||||
|
||||
UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse']
|
||||
|
||||
RSpec.configure do |c|
|
||||
# Project root
|
||||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
||||
|
|
Loading…
Reference in a new issue