Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/test_testgres_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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())

Expand Down Expand Up @@ -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
Expand Down