diff --git a/spec/acceptance/types/mysql_grant_spec.rb b/spec/acceptance/types/mysql_grant_spec.rb index 073f0c87d..97323f4a0 100644 --- a/spec/acceptance/types/mysql_grant_spec.rb +++ b/spec/acceptance/types/mysql_grant_spec.rb @@ -6,9 +6,6 @@ class { 'mysql::server': root_password => 'password', } - package {'which': - ensure => present, - } MANIFEST apply_manifest(pp, catch_failures: true) diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 562140db5..5e9d12740 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -14,3 +14,14 @@ def mysql_version mysql_version = shell_output.stdout.match(%r{\d+\.\d+\.\d+})[0] mysql_version end + +RSpec.configure do |c| + c.before :suite do + if os[:family] == 'debian' || os[:family] == 'ubuntu' + # needed for the puppet fact + apply_manifest("package { 'lsb-release': ensure => installed, }", expect_failures: false) + end + # needed for the grant tests, not installed on el7 docker images + apply_manifest("package { 'which': ensure => installed, }", expect_failures: false) + end +end