Skip to content

Addition of RedHat for locales tests #1002

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
Sep 29, 2017
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/locales_spec.rb
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
7 changes: 4 additions & 3 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ 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'
if fact('operatingsystemmajrelease') =~ %r{7} || fact('operatingsystem') =~ %r{Fedora}
shell('yum install -y bzip2')
end
end

on host, puppet('module', 'install', 'stahnma/epel')
end
end
Expand Down