Skip to content

Commit 7796064

Browse files
committed
test(locale): improve test using locale en_US.UTF-8
1 parent 10126fb commit 7796064

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

pillar.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ postgres:
3636
# The default `encoding` is derived from the `locale` so not recommended
3737
# to provide a value for it unless necessary
3838
cluster:
39-
locale: en_GB.UTF-8
39+
locale: en_US.UTF-8
4040
# encoding: UTF8
4141

4242
#'Alternatives system' priority incremental. 0 disables feature.

test/integration/default/controls/command_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# Can't use `%Q` here due to the `\`
1111
describe command(%q{su - postgres -c 'psql -p} + pg_port + %q{ -qtc "\l+ db2"'}) do
12-
its(:stdout) { should match(/.*db2.*my_space/) }
13-
# its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
12+
its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
1413
end
1514
end

test/salt/pillar/postgres.sls

+17-17
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ postgres:
4242
# - postgresql-contrib
4343
# - postgresql-plpython
4444

45-
# # CLUSTER
46-
# # The default `encoding` is derived from the `locale` so not recommended
47-
# # to provide a value for it unless necessary
48-
# cluster:
49-
# locale: en_GB.UTF-8
50-
# # encoding: UTF8
51-
#
45+
# CLUSTER
46+
# The default `encoding` is derived from the `locale` so not recommended
47+
# to provide a value for it unless necessary
48+
cluster:
49+
locale: en_US.UTF-8
50+
# encoding: UTF8
51+
5252
# #'Alternatives system' priority incremental. 0 disables feature.
5353
# linux:
5454
# altpriority: 30
@@ -166,20 +166,20 @@ postgres:
166166
# databases to be created
167167
databases:
168168
db1:
169-
owner: 'localUser'
170-
# template: 'template0'
171-
# lc_ctype: 'en_US.UTF-8'
172-
# lc_collate: 'en_US.UTF-8'
169+
owner: localUser
170+
template: template0
171+
lc_ctype: en_US.UTF-8
172+
lc_collate: en_US.UTF-8
173173
db2:
174-
owner: 'remoteUser'
175-
# template: 'template0'
176-
# lc_ctype: 'en_US.UTF-8'
177-
# lc_collate: 'en_US.UTF-8'
178-
tablespace: 'my_space'
174+
owner: remoteUser
175+
template: template0
176+
lc_ctype: en_US.UTF-8
177+
lc_collate: en_US.UTF-8
178+
tablespace: my_space
179179
# set custom schema
180180
schemas:
181181
public:
182-
owner: 'localUser'
182+
owner: localUser
183183
# enable per-db extension
184184
{%- if grains.os_family == 'Debian' and grains.osfinger != 'Debian-8' %}
185185
extensions:

0 commit comments

Comments
 (0)