Skip to content

Commit c12557f

Browse files
committed
fix: revert DB locale to C
* EN_us.UTF-8 choice breaks install if the locale is not installed on the system, revert default DB locale to C.UTF-8 * Introduce database_locale to change it Kudos @JGodin-C2C @saimonn References puppetlabs/puppetlabs-puppetdb#412 puppetlabs/puppetlabs-puppetdb#421 puppetlabs/puppetlabs-puppetdb#422
1 parent 985309f commit c12557f

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

spec/unit/classes/database/postgresql_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
grant: 'all',
6464
port: params[:database_port].to_i,
6565
encoding: 'UTF8',
66-
locale: 'en_US.UTF-8'
66+
locale: 'C.UTF-8'
6767
)
6868
}
6969

spec/unit/classes/master/config_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
context "on #{os}" do
88
let(:facts) { facts }
99

10+
let(:termini_package_name) do
11+
case facts[:os]['family']
12+
when 'Archlinux', 'OpenBSD'
13+
'puppetdb-termini'
14+
when 'Debian', 'RedHat', 'Suse'
15+
'openvoxdb-termini'
16+
end
17+
end
18+
1019
context 'when PuppetDB on remote server' do
1120
context 'when using default values' do
1221
it { is_expected.to compile.with_all_deps }

spec/unit/classes/server_spec.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
end
1515
end
1616

17+
let(:package_name) do
18+
case facts[:os]['family']
19+
when 'Archlinux', 'OpenBSD'
20+
'puppetdb'
21+
when 'Debian', 'RedHat', 'Suse'
22+
'openvoxdb'
23+
end
24+
end
25+
1726
on_supported_os.each do |os, facts|
1827
context "on #{os}" do
1928
let(:facts) { facts }
@@ -28,7 +37,7 @@
2837
it { is_expected.to contain_class('puppetdb::server::puppetdb') }
2938

3039
it {
31-
is_expected.to contain_package('puppetdb').
40+
is_expected.to contain_package(package_name).
3241
that_notifies('Service[puppetdb]')
3342
}
3443

0 commit comments

Comments
 (0)