aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-04-08 13:32:38 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2017-04-08 13:32:38 +0300
commit9025af3ed039dd3bb9286b5af2fbdb29b9eb204e (patch)
treed7f252d86253a0bb6e2200f3908c2ed2cfb5ace5
parentf0e44021dfbdd37cb72aea71e3b3cf8b0397f9c5 (diff)
downloadpostgresql-9025af3ed039dd3bb9286b5af2fbdb29b9eb204e.tar.gz
postgresql-9025af3ed039dd3bb9286b5af2fbdb29b9eb204e.zip
Fix the new SASLprep tests to work with non-UTF-8 locales.
Fix by forcing database encoding to UTF-8, regardless of the current locale. Pointed out by Tom Lane. Discussion: https://www.postgresql.org/message-id/8934.1491614631@sss.pgh.pa.us
-rw-r--r--src/test/authentication/t/002_saslprep.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl
index 0c18528e7af..7e373ed7bf4 100644
--- a/src/test/authentication/t/002_saslprep.pl
+++ b/src/test/authentication/t/002_saslprep.pl
@@ -42,9 +42,10 @@ SKIP:
{
skip "authentication tests cannot run on Windows", 12 if ($windows_os);
- # Initialize master node
+ # Initialize master node. Force UTF-8 encoding, so that we can use non-ASCII
+ # characters in the passwords below.
my $node = get_new_node('master');
- $node->init;
+ $node->init(extra => ['--locale=C', '--encoding=UTF8']);
$node->start;
# These tests are based on the example strings from RFC4013.txt,