Skip to content

Commit

Permalink
test(locale): improve test using locale en_US.UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed May 31, 2019
1 parent 10126fb commit 7796064
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ postgres:
# The default `encoding` is derived from the `locale` so not recommended
# to provide a value for it unless necessary
cluster:
locale: en_GB.UTF-8
locale: en_US.UTF-8
# encoding: UTF8

#'Alternatives system' priority incremental. 0 disables feature.
Expand Down
3 changes: 1 addition & 2 deletions test/integration/default/controls/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

# Can't use `%Q` here due to the `\`
describe command(%q{su - postgres -c 'psql -p} + pg_port + %q{ -qtc "\l+ db2"'}) do
its(:stdout) { should match(/.*db2.*my_space/) }
# its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
end
end
34 changes: 17 additions & 17 deletions test/salt/pillar/postgres.sls
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ postgres:
# - postgresql-contrib
# - postgresql-plpython

# # CLUSTER
# # The default `encoding` is derived from the `locale` so not recommended
# # to provide a value for it unless necessary
# cluster:
# locale: en_GB.UTF-8
# # encoding: UTF8
#
# CLUSTER
# The default `encoding` is derived from the `locale` so not recommended
# to provide a value for it unless necessary
cluster:
locale: en_US.UTF-8
# encoding: UTF8

# #'Alternatives system' priority incremental. 0 disables feature.
# linux:
# altpriority: 30
Expand Down Expand Up @@ -166,20 +166,20 @@ postgres:
# databases to be created
databases:
db1:
owner: 'localUser'
# template: 'template0'
# lc_ctype: 'en_US.UTF-8'
# lc_collate: 'en_US.UTF-8'
owner: localUser
template: template0
lc_ctype: en_US.UTF-8
lc_collate: en_US.UTF-8
db2:
owner: 'remoteUser'
# template: 'template0'
# lc_ctype: 'en_US.UTF-8'
# lc_collate: 'en_US.UTF-8'
tablespace: 'my_space'
owner: remoteUser
template: template0
lc_ctype: en_US.UTF-8
lc_collate: en_US.UTF-8
tablespace: my_space
# set custom schema
schemas:
public:
owner: 'localUser'
owner: localUser
# enable per-db extension
{%- if grains.os_family == 'Debian' and grains.osfinger != 'Debian-8' %}
extensions:
Expand Down

0 comments on commit 7796064

Please sign in to comment.