File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -184,15 +184,30 @@ def pg_log_name(self):
184
184
return self .pg_log_file
185
185
186
186
def cleanup (self , max_attempts = 3 , full = False ):
187
- super ().cleanup (max_attempts , full )
187
+ assert type (max_attempts ) == int
188
+ assert type (full ) == bool
189
+ assert max_attempts > 0
190
+
191
+ super ().cleanup (max_attempts = max_attempts , full = full )
192
+
193
+ if testgres_config .node_cleanup_full :
194
+ # Remove all
195
+ pass
196
+ elif full :
197
+ # Remove all
198
+ pass
199
+ else :
200
+ assert not full
201
+ assert not testgres_config .node_cleanup_full
188
202
189
- base_dir_items = self .os_ops .listdir (self .base_dir )
190
- assert base_dir_items is not None
191
- assert type (base_dir_items ) == list # noqa: E721
203
+ base_dir_items = self .os_ops .listdir (self .base_dir )
204
+ assert base_dir_items is not None
205
+ assert type (base_dir_items ) == list # noqa: E721
192
206
193
- if len (base_dir_items ) = = 0 :
194
- self . os_ops . rmdirs ( self . base_dir , ignore_errors = False )
207
+ if len (base_dir_items ) ! = 0 :
208
+ return
195
209
210
+ self .os_ops .rmdirs (self .base_dir , ignore_errors = False )
196
211
return self
197
212
198
213
You can’t perform that action at this time.
0 commit comments