Fix test suite for Postgres backup helper
This commit is contained in:
parent
2b047b7adb
commit
640d0e79f8
|
@ -50,6 +50,7 @@ class TestPostgresHelper(TestCase):
|
||||||
stdout = proc.stdout.read()
|
stdout = proc.stdout.read()
|
||||||
self.assertEqual(proc.wait(), 0)
|
self.assertEqual(proc.wait(), 0)
|
||||||
self.assertIn(b"CREATE TABLE", stdout)
|
self.assertIn(b"CREATE TABLE", stdout)
|
||||||
|
proc.stdout.close()
|
||||||
|
|
||||||
def test_backup_and_extraction(self):
|
def test_backup_and_extraction(self):
|
||||||
td = TemporaryDirectory("test_pg_bae")
|
td = TemporaryDirectory("test_pg_bae")
|
||||||
|
@ -63,7 +64,7 @@ class TestPostgresHelper(TestCase):
|
||||||
set_up_simple_datman(
|
set_up_simple_datman(
|
||||||
datman_path,
|
datman_path,
|
||||||
custom_extra_test=f"""
|
custom_extra_test=f"""
|
||||||
[source.postgres123]
|
[sources.postgres123]
|
||||||
helper = "postgres"
|
helper = "postgres"
|
||||||
label = "precious"
|
label = "precious"
|
||||||
kind = {{ stdout = "postgres123.sql" }}
|
kind = {{ stdout = "postgres123.sql" }}
|
||||||
|
@ -104,3 +105,4 @@ user = "{pg_user}"
|
||||||
self.assertIsInstance(value, DirectoryDescriptor)
|
self.assertIsInstance(value, DirectoryDescriptor)
|
||||||
key, value = next(iter(value.contents.items()))
|
key, value = next(iter(value.contents.items()))
|
||||||
self.assertEqual(key, "postgres123.sql")
|
self.assertEqual(key, "postgres123.sql")
|
||||||
|
td.cleanup()
|
||||||
|
|
Loading…
Reference in New Issue