Skip to content

Commit f01fd61

Browse files
s.logvinenkos.logvinenko
authored andcommitted
add new test case
1 parent 71590bf commit f01fd61

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/auth_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,17 @@ def test_right_password(self):
120120
except (TIMEOUT, ExceptionPexpect) as e:
121121
self.fail(e.value)
122122

123+
def test_right_password_and_wrong_pgpass(self):
124+
""" Test case: PGPB_AUTH05 - correct password and incorrect .pgpass"""
125+
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password'])
126+
create_pgpass(self.pgpass_file, line)
127+
try:
128+
self.assertIn("completed",
129+
str(run_pb_with_auth([self.pb.probackup_path] + self.cmd, 'password\r\n'))
130+
)
131+
except (TIMEOUT, ExceptionPexpect) as e:
132+
self.fail(e.value)
133+
123134
def test_ctrl_c_event(self):
124135
""" Test case: PGPB_AUTH02 - send interrupt signal """
125136
try:

0 commit comments

Comments
 (0)