Skip to content

Commit 39c6d79

Browse files
committed
make NodeBackup aware of inheritors of PostgresNode
1 parent bf33992 commit 39c6d79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: testgres/backup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ def spawn_primary(self, name=None, destroy=True):
143143
base_dir = self._prepare_dir(destroy)
144144

145145
# Build a new PostgresNode
146-
from .node import PostgresNode
147-
with clean_on_error(PostgresNode(name=name, base_dir=base_dir)) as node:
146+
NodeClass = self.original_node.__class__
147+
with clean_on_error(NodeClass(name=name, base_dir=base_dir)) as node:
148148

149149
# New nodes should always remove dir tree
150150
node._should_rm_dirs = True

0 commit comments

Comments
 (0)