Skip to content

Commit 97a9f35

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 97a9f35

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

spec/support/acceptance/shared/puppetdb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
line => '#PIDFile=/run/puppetlabs/puppetdb/puppetdb.pid',
1111
match => '^PIDFile.*',
1212
append_on_no_match => false,
13-
require => Package['puppetdb'],
13+
require => Package['openvoxdb'],
1414
notify => Service['puppetdb'],
1515
}
1616
}

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: 10 additions & 1 deletion
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 }
@@ -62,7 +71,7 @@
6271
end
6372

6473
context 'when using default values' do
65-
it { is_expected.to contain_package('puppetdb-termini').with(ensure: 'present') }
74+
it { is_expected.to contain_package(termini_package_name).with(ensure: 'present') }
6675
it { is_expected.to contain_puppetdb_conn_validator('puppetdb_conn').with(test_url: '/pdb/meta/v1/version') }
6776
end
6877

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)