diff --git a/spec/acceptance/locales_spec.rb b/spec/acceptance/locales_spec.rb index fbee39e7d..7c3d3dec3 100644 --- a/spec/acceptance/locales_spec.rb +++ b/spec/acceptance/locales_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper_acceptance' require 'beaker/i18n_helper' -describe 'mysql localization', if: fact('osfamily') == 'Debian' && puppet_version =~ %r{(^4\.10\.[56789]|5\.\d\.\d)} do +describe 'mysql localization', if: (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && puppet_version =~ %r{(^4\.10\.[56789]|5\.\d\.\d)} do before :all do hosts.each do |host| on(host, "sed -i \"96i FastGettext.locale='ja'\" /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb") diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index a6bb47828..df07f773c 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -29,12 +29,14 @@ def puppet_version c.before :suite do hosts.each do |host| # This will be removed, this is temporary to test localisation. + if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && (puppet_version >= '4.10.5' && puppet_version < '5.2.0') + on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja') + on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po') + end if fact('osfamily') == 'Debian' # install language on debian systems install_language_on(host, 'ja_JP.utf-8') if not_controller(host) # This will be removed, this is temporary to test localisation. - on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja') - on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po') end # Required for binding tests. if fact('osfamily') == 'RedHat' @@ -42,7 +44,6 @@ def puppet_version shell('yum install -y bzip2') end end - on host, puppet('module', 'install', 'stahnma/epel') end end