Skip to content

Commit 1498842

Browse files
authored
Merge pull request #1002 from HelenCampbell/redhataddin
Addition of RedHat for locales tests
2 parents 037eb3d + 07f3f62 commit 1498842

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

spec/acceptance/locales_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'spec_helper_acceptance'
22
require 'beaker/i18n_helper'
33

4-
describe 'mysql localization', if: fact('osfamily') == 'Debian' && puppet_version =~ %r{(^4\.10\.[56789]|5\.\d\.\d)} do
4+
describe 'mysql localization', if: (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && puppet_version =~ %r{(^4\.10\.[56789]|5\.\d\.\d)} do
55
before :all do
66
hosts.each do |host|
77
on(host, "sed -i \"96i FastGettext.locale='ja'\" /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb")

spec/spec_helper_acceptance.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,21 @@ def puppet_version
2929
c.before :suite do
3030
hosts.each do |host|
3131
# This will be removed, this is temporary to test localisation.
32+
if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && (puppet_version >= '4.10.5' && puppet_version < '5.2.0')
33+
on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja')
34+
on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po')
35+
end
3236
if fact('osfamily') == 'Debian'
3337
# install language on debian systems
3438
install_language_on(host, 'ja_JP.utf-8') if not_controller(host)
3539
# This will be removed, this is temporary to test localisation.
36-
on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja')
37-
on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po')
3840
end
3941
# Required for binding tests.
4042
if fact('osfamily') == 'RedHat'
4143
if fact('operatingsystemmajrelease') =~ %r{7} || fact('operatingsystem') =~ %r{Fedora}
4244
shell('yum install -y bzip2')
4345
end
4446
end
45-
4647
on host, puppet('module', 'install', 'stahnma/epel')
4748
end
4849
end

0 commit comments

Comments
 (0)