Skip to content

Commit

Permalink
Merge pull request puppetlabs#1125 from david22swan/MODULES-7827
Browse files Browse the repository at this point in the history
(MODULES-7827) - Update i18n test logic for puppet 6
  • Loading branch information
eimlav authored Sep 20, 2018
2 parents 87ff7f0 + ba92c1b commit c63a061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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' || fact('osfamily') == 'RedHat') && puppet_version =~ %r{(^4\.10\.[56789]|5\.\d\.\d)} do
describe 'mysql localization', if: (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && (Gem::Version.new(puppet_version) >= Gem::Version.new('4.10.5')) 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
5 changes: 3 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@

# Configure all nodes in nodeset
c.before :suite do
run_puppet_access_login(user: 'admin') if pe_install? && puppet_version =~ %r{(5\.\d\.\d)}
run_puppet_access_login(user: 'admin') if pe_install? && (Gem::Version.new(puppet_version) >= Gem::Version.new('5.0.0'))
hosts.each do |host|
# This will be removed, this is temporary to test localisation.
if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') && (Gem::Version.new(puppet_version) >= Gem::Version.new('4.10.5') &&
if (fact('osfamily') == 'Debian' || fact('osfamily') == 'RedHat') &&
(Gem::Version.new(puppet_version) >= Gem::Version.new('4.10.5') &&
Gem::Version.new(puppet_version) < Gem::Version.new('5.2.0'))
on(host, 'mkdir /opt/puppetlabs/puppet/share/locale/ja')
on(host, 'touch /opt/puppetlabs/puppet/share/locale/ja/puppet.po')
Expand Down

0 comments on commit c63a061

Please sign in to comment.