Merge pull request #378 from apenney/fix-ordering
Fix the locale generation for Debian.
This commit is contained in:
commit
d96b77e4d1
3 changed files with 5 additions and 28 deletions
|
@ -35,16 +35,6 @@ describe 'postgresql::server::db', :unless => UNSUPPORTED_PLATFORMS.include?(fac
|
|||
begin
|
||||
pp = <<-EOS.unindent
|
||||
class { 'postgresql::server': }
|
||||
if($::operatingsystem == 'Debian') {
|
||||
# Need to make sure the correct locale is installed first
|
||||
file { '/etc/locale.gen':
|
||||
content => "en_US ISO-8859-1\nen_NG UTF-8\n",
|
||||
}~>
|
||||
exec { '/usr/sbin/locale-gen':
|
||||
logoutput => true,
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
postgresql::server::db { 'test1':
|
||||
user => 'test1',
|
||||
password => postgresql_password('test1', 'test1'),
|
||||
|
|
|
@ -50,24 +50,6 @@ describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))
|
|||
end
|
||||
|
||||
describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
|
||||
before :all do
|
||||
pp = <<-EOS
|
||||
if($::operatingsystem =~ /Debian|Ubuntu/) {
|
||||
# Need to make sure the correct utf8 locale is ready for our
|
||||
# non-standard tests
|
||||
file { '/etc/locale.gen':
|
||||
content => "en_US ISO-8859-1\nen_NG UTF-8\nen_US UTF-8\n",
|
||||
}~>
|
||||
exec { '/usr/sbin/locale-gen':
|
||||
logoutput => true,
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
end
|
||||
|
||||
context 'test installing non-default version of postgresql' do
|
||||
after :all do
|
||||
psql('--command="drop database postgresql_test_db" postgres', 'postgres')
|
||||
|
|
|
@ -63,6 +63,11 @@ RSpec.configure do |c|
|
|||
puppet_module_install(:source => proj_root, :module_name => 'postgresql')
|
||||
hosts.each do |host|
|
||||
on host, shell('chmod 755 /root')
|
||||
if fact('osfamily') == 'Debian'
|
||||
shell("echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen")
|
||||
shell('/usr/sbin/locale-gen')
|
||||
shell('/usr/sbin/update-locale')
|
||||
end
|
||||
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
|
||||
on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] }
|
||||
on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
|
||||
|
|
Loading…
Reference in a new issue