File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -801,13 +801,15 @@ def free_port(self):
801
801
self ._should_free_port = False
802
802
release_port (self .port )
803
803
804
- def cleanup (self , max_attempts = 3 ):
804
+ def cleanup (self , max_attempts = 3 , full_clean = testgres_config . node_cleanup_full ):
805
805
"""
806
806
Stop node if needed and remove its data/logs directory.
807
807
NOTE: take a look at TestgresConfig.node_cleanup_full.
808
808
809
809
Args:
810
810
max_attempts: how many times should we try to stop()?
811
+ full_clean: True - clean all node data
812
+ False - clean only data dir, save logs
811
813
812
814
Returns:
813
815
This instance of :class:`.PostgresNode`.
@@ -816,7 +818,7 @@ def cleanup(self, max_attempts=3):
816
818
self ._try_shutdown (max_attempts )
817
819
818
820
# choose directory to be removed
819
- if testgres_config . node_cleanup_full :
821
+ if full_clean :
820
822
rm_dir = self .base_dir # everything
821
823
else :
822
824
rm_dir = self .data_dir # just data, save logs
You can’t perform that action at this time.
0 commit comments