From: Peter Eisentraut Date: Sun, 11 Aug 2019 16:32:46 +0000 (+0200) Subject: Add test for md5 authentication with plain-text password stored X-Git-Tag: pgbouncer_1_11_0~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b32ca35dd3868e89e6876efc02824f7943ad2a9b;p=pgbouncer 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. --- 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