1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-02-09 14:33:17 +02:00

- fix auth_test

- add -W options to case: test_right_password_and_wrong_pgpass
This commit is contained in:
sfalkon 2018-01-12 11:27:33 +03:00
parent d46161521e
commit 3cfb8e2242

View File

@ -123,12 +123,12 @@ class AuthTest(unittest.TestCase):
self.fail(e.value) self.fail(e.value)
def test_right_password_and_wrong_pgpass(self): def test_right_password_and_wrong_pgpass(self):
""" Test case: PGPB_AUTH05 - correct password and incorrect .pgpass""" """ Test case: PGPB_AUTH05 - correct password and incorrect .pgpass (-W)"""
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password']) line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password'])
create_pgpass(self.pgpass_file, line) create_pgpass(self.pgpass_file, line)
try: try:
self.assertIn("completed", self.assertIn("completed",
str(run_pb_with_auth([self.pb.probackup_path] + self.cmd, 'password\r\n')) str(run_pb_with_auth([self.pb.probackup_path] + self.cmd + ['-W'], 'password\r\n'))
) )
except (TIMEOUT, ExceptionPexpect) as e: except (TIMEOUT, ExceptionPexpect) as e:
self.fail(e.value) self.fail(e.value)