Fix to install ruby-mysql from gem.
This commit is contained in:
parent
dec2af67b8
commit
ad5381d67a
1 changed files with 14 additions and 3 deletions
|
@ -2,6 +2,7 @@ require 'spec_helper_acceptance'
|
||||||
|
|
||||||
osfamily = fact('osfamily')
|
osfamily = fact('osfamily')
|
||||||
operatingsystem = fact('operatingsystem')
|
operatingsystem = fact('operatingsystem')
|
||||||
|
ruby_package_provider = 'undef'
|
||||||
|
|
||||||
case osfamily
|
case osfamily
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
|
@ -10,6 +11,9 @@ when 'RedHat'
|
||||||
php_package = 'php-mysql'
|
php_package = 'php-mysql'
|
||||||
python_package = 'MySQL-python'
|
python_package = 'MySQL-python'
|
||||||
ruby_package = 'ruby-mysql'
|
ruby_package = 'ruby-mysql'
|
||||||
|
if fact('operatingsystemmajrelease') == '7'
|
||||||
|
ruby_package_provider = 'gem'
|
||||||
|
end
|
||||||
when 'Suse'
|
when 'Suse'
|
||||||
java_package = 'mysql-connector-java'
|
java_package = 'mysql-connector-java'
|
||||||
perl_package = 'perl-DBD-mysql'
|
perl_package = 'perl-DBD-mysql'
|
||||||
|
@ -81,7 +85,7 @@ describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact
|
||||||
perl_package_provider => undef,
|
perl_package_provider => undef,
|
||||||
php_package_provider => undef,
|
php_package_provider => undef,
|
||||||
python_package_provider => undef,
|
python_package_provider => undef,
|
||||||
ruby_package_provider => undef,
|
ruby_package_provider => #{ruby_package_provider},
|
||||||
}
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
@ -110,8 +114,15 @@ describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact
|
||||||
it { should be_installed }
|
it { should be_installed }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe package(ruby_package) do
|
# ruby-mysql is installed via gem on RHEL7, be_installed doesn't know how to check that
|
||||||
it { should be_installed }
|
if fact('osfamily') == 'RedHat' && fact('operatingsystemmajrelease') == '7'
|
||||||
|
describe package(ruby_package) do
|
||||||
|
it { should_not be_installed }
|
||||||
|
end
|
||||||
|
else
|
||||||
|
describe package(ruby_package) do
|
||||||
|
it { should be_installed }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue