From b32ca35dd3868e89e6876efc02824f7943ad2a9b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 11 Aug 2019 18:32:46 +0200 Subject: [PATCH] Add test for md5 authentication with plain-text password stored Now we have tests for all four combinations of plain-text and md5 passwords and plain and md5 authentication. --- test/test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test.sh b/test/test.sh index 3a52fef..2fae0de 100755 --- a/test/test.sh +++ b/test/test.sh @@ -607,6 +607,8 @@ test_password_server() { test_password_client() { admin "set auth_type='plain'" + # test with users that have a plain-text password stored + # good password PGPASSWORD=foo psql -X -U puser1 -c "select 1" p1 || return 1 # bad password @@ -640,6 +642,15 @@ test_md5_server() { test_md5_client() { admin "set auth_type='md5'" + # test with users that have a plain-text password stored + + # good password + PGPASSWORD=foo psql -X -U puser1 -c "select 1" p1 || return 1 + # bad password + PGPASSWORD=wrong psql -X -U puser2 -c "select 2" p1 && return 1 + + # test with users that have an md5 password stored + # good password PGPASSWORD=foo psql -X -U muser1 -c "select 1" p1 || return 1 # bad password -- 2.50.1