Skip to content

Commit 71590bf

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

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
@@ -154,6 +154,17 @@ def test_pgpass(self):
154154
self.fail(e)
155155

156156
def test_pgpassword(self):
157+
os.environ["PGPASSWORD"] = "password"
158+
try:
159+
self.assertEqual(
160+
"OK",
161+
self.pb.show_pb(self.backup_dir, self.node.name, self.pb.run_pb(self.cmd + ['-w']))["status"],
162+
"ERROR: Full backup status is not valid."
163+
)
164+
except ProbackupException as e:
165+
self.fail(e)
166+
167+
def test_pgpassword_and_wrong_pgpass(self):
157168
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password'])
158169
create_pgpass(self.pgpass_file, line)
159170
os.environ["PGPASSWORD"] = "password"

0 commit comments

Comments
 (0)