Skip to content

Commit 80d4471

Browse files
committed
Merge pull request #194 from kbarber/fixed_failing_utf8_tests
Fix the non-defaults test failing to use UTF8
2 parents 27e40da + 2676904 commit 80d4471

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Gemfile.lock
44
metadata.json
55
spec/fixtures
66
pkg/
7+
.rspec_system/

spec/system/non_defaults_spec.rb

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
require 'spec_helper_system'
22

33
describe 'non defaults:' do
4+
before :all do
5+
puppet_apply(<<-EOS)
6+
if($::operatingsystem =~ /Debian|Ubuntu/) {
7+
# Need to make sure the correct utf8 locale is ready for our
8+
# non-standard tests
9+
file { '/etc/locale.gen':
10+
content => "en_US ISO-8859-1\nen_NG UTF-8\nen_US UTF-8\n",
11+
}~>
12+
exec { '/usr/sbin/locale-gen':
13+
logoutput => true,
14+
refreshonly => true,
15+
}
16+
}
17+
EOS
18+
end
19+
420
context 'test installing non-default version of postgresql' do
521
after :each do
622
# Cleanup
@@ -23,8 +39,10 @@ class { 'postgresql::server':
2339
# Configure version and manage_package_repo globally, install postgres
2440
# and then try to install a new database.
2541
class { "postgresql":
26-
version => "9.2",
27-
manage_package_repo => true,
42+
version => "9.2",
43+
manage_package_repo => true,
44+
charset => 'UTF8',
45+
locale => 'en_US.UTF-8',
2846
}->
2947
class { "postgresql::server": }->
3048
postgresql::db { "postgresql_test_db":

0 commit comments

Comments
 (0)