test(locale): improve test using locale en_US.UTF-8

This commit is contained in:
Imran Iqbal
2019-05-31 00:28:42 +01:00
parent 10126fb740
commit 77960641dd
3 changed files with 19 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ postgres:
# The default `encoding` is derived from the `locale` so not recommended # The default `encoding` is derived from the `locale` so not recommended
# to provide a value for it unless necessary # to provide a value for it unless necessary
cluster: cluster:
locale: en_GB.UTF-8 locale: en_US.UTF-8
# encoding: UTF8 # encoding: UTF8
#'Alternatives system' priority incremental. 0 disables feature. #'Alternatives system' priority incremental. 0 disables feature.

View File

@@ -9,7 +9,6 @@ control 'Postgres command' do
# Can't use `%Q` here due to the `\` # Can't use `%Q` here due to the `\`
describe command(%q{su - postgres -c 'psql -p} + pg_port + %q{ -qtc "\l+ db2"'}) do 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
end end

View File

@@ -42,13 +42,13 @@ postgres:
# - postgresql-contrib # - postgresql-contrib
# - postgresql-plpython # - postgresql-plpython
# # CLUSTER # CLUSTER
# # The default `encoding` is derived from the `locale` so not recommended # The default `encoding` is derived from the `locale` so not recommended
# # to provide a value for it unless necessary # to provide a value for it unless necessary
# cluster: cluster:
# locale: en_GB.UTF-8 locale: en_US.UTF-8
# # encoding: UTF8 # encoding: UTF8
#
# #'Alternatives system' priority incremental. 0 disables feature. # #'Alternatives system' priority incremental. 0 disables feature.
# linux: # linux:
# altpriority: 30 # altpriority: 30
@@ -166,20 +166,20 @@ postgres:
# databases to be created # databases to be created
databases: databases:
db1: db1:
owner: 'localUser' owner: localUser
# template: 'template0' template: template0
# lc_ctype: 'en_US.UTF-8' lc_ctype: en_US.UTF-8
# lc_collate: 'en_US.UTF-8' lc_collate: en_US.UTF-8
db2: db2:
owner: 'remoteUser' owner: remoteUser
# template: 'template0' template: template0
# lc_ctype: 'en_US.UTF-8' lc_ctype: en_US.UTF-8
# lc_collate: 'en_US.UTF-8' lc_collate: en_US.UTF-8
tablespace: 'my_space' tablespace: my_space
# set custom schema # set custom schema
schemas: schemas:
public: public:
owner: 'localUser' owner: localUser
# enable per-db extension # enable per-db extension
{%- if grains.os_family == 'Debian' and grains.osfinger != 'Debian-8' %} {%- if grains.os_family == 'Debian' and grains.osfinger != 'Debian-8' %}
extensions: extensions: