From 71590bf7f3f2b885d1f91f540b83a2b3ff9baffe Mon Sep 17 00:00:00 2001 From: "s.logvinenko" Date: Wed, 6 Dec 2017 10:32:30 +0300 Subject: [PATCH] add new test case --- tests/auth_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/auth_test.py b/tests/auth_test.py index 73af2488..d3512460 100644 --- a/tests/auth_test.py +++ b/tests/auth_test.py @@ -154,6 +154,17 @@ class AuthTest(unittest.TestCase): self.fail(e) def test_pgpassword(self): + os.environ["PGPASSWORD"] = "password" + try: + self.assertEqual( + "OK", + self.pb.show_pb(self.backup_dir, self.node.name, self.pb.run_pb(self.cmd + ['-w']))["status"], + "ERROR: Full backup status is not valid." + ) + except ProbackupException as e: + self.fail(e) + + def test_pgpassword_and_wrong_pgpass(self): line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password']) create_pgpass(self.pgpass_file, line) os.environ["PGPASSWORD"] = "password"