File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ def _renew_files_cache(self):
213213 obsolete_ids .append (id )
214214
215215 for obsolete_id in obsolete_ids :
216+ LOGGER .info ('Logs for execution #' + obsolete_id + ' were deleted' )
216217 del cache [obsolete_id ]
217218
218219 for file in os .listdir (self ._output_folder ):
Original file line number Diff line number Diff line change @@ -194,6 +194,24 @@ def test_history_entries_after_restart(self):
194194 entry = new_service .get_history_entries ()[0 ]
195195 self .validate_history_entry (entry , id = 'id1' )
196196
197+ def test_get_history_entries_after_delete (self ):
198+ self .simulate_logging (execution_id = 'id1' )
199+
200+ for file in os .listdir (test_utils .temp_folder ):
201+ os .remove (os .path .join (test_utils .temp_folder , file ))
202+
203+ entries = self .logging_service .get_history_entries ()
204+ self .assertCountEqual ([], entries )
205+
206+ def test_find_history_entry_after_delete (self ):
207+ self .simulate_logging (execution_id = 'id1' )
208+
209+ for file in os .listdir (test_utils .temp_folder ):
210+ os .remove (os .path .join (test_utils .temp_folder , file ))
211+
212+ entry = self .logging_service .find_history_entry ('id1' )
213+ self .assertIsNone (entry )
214+
197215 def test_find_history_entry (self ):
198216 self .simulate_logging (execution_id = 'id1' )
199217
You can’t perform that action at this time.
0 commit comments