diff --git a/tests/test_testgres_common.py b/tests/test_testgres_common.py index 8cc86432..6b27c3e5 100644 --- a/tests/test_testgres_common.py +++ b/tests/test_testgres_common.py @@ -1783,9 +1783,9 @@ def test_dump(self, node_svc: PostgresNodeService, dump_fmt: enums.DumpFormat): with removing(node_svc.os_ops, node1.dump(format=dump_fmt)) as dump: with __class__.helper__get_node(node_svc).init().start() as node3: if dump_fmt == enums.DumpFormat.Directory: - assert (os.path.isdir(dump)) + assert (node_svc.os_ops.isdir(dump)) else: - assert (os.path.isfile(dump)) + assert (node_svc.os_ops.isfile(dump)) # restore dump node3.restore(filename=dump) res = node3.execute(query_select) @@ -1801,7 +1801,7 @@ def test_dump_with_options(self, node_svc: PostgresNodeService): # Test dump with --schema-only option with removing(node_svc.os_ops, node1.dump(options=['--schema-only'])) as dump: with __class__.helper__get_node(node_svc).init().start() as node2: - assert (os.path.isfile(dump)) + assert (node_svc.os_ops.isfile(dump)) # restore schema-only dump node2.restore(filename=dump) @@ -2680,6 +2680,7 @@ def test_node_app__make_empty_with_explicit_port(self, node_svc: PostgresNodeSer ) assert node_app.os_ops is node_svc.os_ops + assert node_app.port_manager is not None assert node_app.port_manager is node_svc.port_manager assert type(node_app.nodes_to_cleanup) is list assert len(node_app.nodes_to_cleanup) == 0 @@ -2753,6 +2754,7 @@ def test_node_app__make_empty_with_explicit_port(self, node_svc: PostgresNodeSer assert not node._should_free_port break finally: + assert node_app.port_manager is not None while len(ports) > 0: node_app.port_manager.release_port(ports.pop()) @@ -2809,6 +2811,8 @@ def test_node_app__make_empty_and_pgconf(self, node_svc: PostgresNodeService): logging.info("Node is started ...") node.slow_start() + + assert node.status() == NodeStatus.Running return @staticmethod