Skip to content

Add unsupported infrastructure for excluding OSes we can't test on. #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_account_delete_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql::server::account_security class' do
describe 'mysql::server::account_security class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'running puppet code' do
it 'should work with no errors' do
pp = <<-EOS
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_backup_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql::server::backup class' do
describe 'mysql::server::backup class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
context 'should work with no errors' do
it 'when configuring mysql backups' do
pp = <<-EOS
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_bindings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
end
end

describe 'mysql::bindings class' do
describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do

describe 'running puppet code' do
it 'should work with no errors' do
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_db_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql::db define' do
describe 'mysql::db define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'creating a database' do
# Using puppet_apply as a helper
it 'should work with no errors' do
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_server_config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'config location' do
describe 'config location', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
it 'creates the file elsewhere' do
pp = <<-EOS
class { 'mysql::server':
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_server_monitor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql::server::monitor class' do
describe 'mysql::server::monitor class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
it 'should work with no errors' do
pp = <<-EOS
class { 'mysql::server': root_password => 'password' }
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_server_root_password_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql::server::root_password class' do
describe 'mysql::server::root_password class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do

describe 'reset' do
it 'shuts down mysql' do
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql class' do
describe 'mysql class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
case fact('osfamily')
when 'RedHat'
package_name = 'mysql-server'
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/types/mysql_database_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql_database' do
describe 'mysql_database', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'setup' do
it 'should work with no errors' do
pp = <<-EOS
Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/types/mysql_grant_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql_grant' do
describe 'mysql_grant', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do

describe 'setup' do
it 'setup mysql::server' do
Expand Down Expand Up @@ -283,7 +283,7 @@ class { 'mysql::server': }
expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0)
end
end

describe 'adding procedure privileges' do
it 'should work without errors' do
pp = <<-EOS
Expand All @@ -294,10 +294,10 @@ class { 'mysql::server': }
privileges => ['EXECUTE'],
}
EOS

apply_manifest(pp, :catch_failures => true)
end

it 'should find the user' do
shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r|
expect(r.stdout).to match(/GRANT EXECUTE ON PROCEDURE `test`.`simpleproc` TO 'test2'@'tester'/)
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/types/mysql_user_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper_acceptance'

describe 'mysql_user' do
describe 'mysql_user', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'setup' do
it 'should work with no errors' do
pp = <<-EOS
Expand Down
10 changes: 10 additions & 0 deletions spec/acceptance/unsupported_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'spec_helper_acceptance'

describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
it 'should fail' do
pp = <<-EOS
class { 'mysql::server': }
EOS
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported osfamily/i)
end
end
2 changes: 2 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'beaker-rspec'

UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ]

unless ENV['RS_PROVISION'] == 'no'
hosts.each do |host|
# Install Puppet
Expand Down