From c37263e15c61611037d54a77f39afdba48fadbe8 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 9 Jul 2026 10:33:01 +0300 Subject: [PATCH 1/4] fix: TestTestgresCommon::test_dump does not use os_ops - os.path.isdir -> node_svc.os_ops.isdir - os.path.isfile -> node_svc.os_ops.isfile It fixes a work with a remote machine. --- tests/test_testgres_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_testgres_common.py b/tests/test_testgres_common.py index 8cc86432..d1ab3df9 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) From 2b1023d116017e28c592cd9fe6353611941a9d54 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 9 Jul 2026 10:35:25 +0300 Subject: [PATCH 2/4] fix: TestTestgresCommon::test_dump_with_options does not use os_ops - os.path.isfile -> node_svc.os_ops.isfile It fixes a work with a remote machine. --- tests/test_testgres_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_testgres_common.py b/tests/test_testgres_common.py index d1ab3df9..a4e0bc1b 100644 --- a/tests/test_testgres_common.py +++ b/tests/test_testgres_common.py @@ -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) From ccce0c11a832ef7d2b561078c3a52db3f9e249cf Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 9 Jul 2026 10:50:30 +0300 Subject: [PATCH 3/4] test_node_app__make_empty_with_explicit_port is updated (+asserts) --- tests/test_testgres_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_testgres_common.py b/tests/test_testgres_common.py index a4e0bc1b..cf9beb1b 100644 --- a/tests/test_testgres_common.py +++ b/tests/test_testgres_common.py @@ -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()) From 4eb245ef50a12526ca2153b89423fab710b62d6b Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 9 Jul 2026 10:51:39 +0300 Subject: [PATCH 4/4] test_node_app__make_empty_and_pgconf (+check status) --- tests/test_testgres_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_testgres_common.py b/tests/test_testgres_common.py index cf9beb1b..6b27c3e5 100644 --- a/tests/test_testgres_common.py +++ b/tests/test_testgres_common.py @@ -2811,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