Skip to content

Fix the non-defaults test failing to use UTF8 #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Gemfile.lock
metadata.json
spec/fixtures
pkg/
.rspec_system/
22 changes: 20 additions & 2 deletions spec/system/non_defaults_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
require 'spec_helper_system'

describe 'non defaults:' do
before :all do
puppet_apply(<<-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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional that en_US appears twice in this list?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that just means you're wanting to support two different encodings for en_US? Is there a reason why you need the ISO one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess my thought was to preserve the default encoding on the box (en_US ISO-8859-1) to avoid complicating things and introducing any other weirdness. This ISO one is so the locale specific setting later on works (line 45).

}~>
exec { '/usr/sbin/locale-gen':
logoutput => true,
refreshonly => true,
}
}
EOS
end

context 'test installing non-default version of postgresql' do
after :each do
# Cleanup
Expand All @@ -23,8 +39,10 @@ class { 'postgresql::server':
# Configure version and manage_package_repo globally, install postgres
# and then try to install a new database.
class { "postgresql":
version => "9.2",
manage_package_repo => true,
version => "9.2",
manage_package_repo => true,
charset => 'UTF8',
locale => 'en_US.UTF-8',
}->
class { "postgresql::server": }->
postgresql::db { "postgresql_test_db":
Expand Down