diff --git a/spec/acceptance/server/db_spec.rb b/spec/acceptance/server/db_spec.rb index 9096e0b..c6ad693 100644 --- a/spec/acceptance/server/db_spec.rb +++ b/spec/acceptance/server/db_spec.rb @@ -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'), diff --git a/spec/acceptance/server_spec.rb b/spec/acceptance/server_spec.rb index 6fb1701..1d34729 100644 --- a/spec/acceptance/server_spec.rb +++ b/spec/acceptance/server_spec.rb @@ -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') diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 0697d42..088aaf4 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -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] }