1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-04-18 12:33:33 +02:00

fix port int to string

This commit is contained in:
sfalkon 2017-12-05 17:28:00 +03:00
parent 6cf129546d
commit 065fb0e539

View File

@ -131,7 +131,7 @@ class AuthTest(unittest.TestCase):
def test_pgpassfile_env(self):
path = os.path.join(self.pb.tmp_path, module_name, 'pgpass.conf')
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'password'])
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'password'])
create_pgpass(path, line)
os.environ["PGPASSFILE"] = path
try:
@ -145,7 +145,7 @@ class AuthTest(unittest.TestCase):
def test_pgpass(self):
path = os.path.join(os.path.expanduser('~'), '.pgpass')
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'password'])
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'password'])
create_pgpass(path, line)
try:
self.assertEqual(
@ -158,7 +158,7 @@ class AuthTest(unittest.TestCase):
def test_pgpassword(self):
path = os.path.join(os.path.expanduser('~'), '.pgpass')
line = ":".join(['127.0.0.1', self.node.port, 'postgres', 'backup', 'wrong_password'])
line = ":".join(['127.0.0.1', str(self.node.port), 'postgres', 'backup', 'wrong_password'])
create_pgpass(path, line)
os.environ["PGPASSWORD"] = 'password'
try: