Skip to content

Commit

Permalink
Changes to status view (log2timeline#4864)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Apr 7, 2024
1 parent e349697 commit 25ec9f7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions plaso/cli/status_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _PrintAnalysisStatusHeader(self, processing_status):
f'Storage file\t\t: {self._storage_file_path:s}\n')

processing_time = self._FormatProcessingTime(processing_status)
self._output_writer.Write(f'Processing time\t: {processing_time:s}\n')
self._output_writer.Write(f'Processing time\t\t: {processing_time:s}\n')

if processing_status and processing_status.events_status:
self._PrintEventsStatus(processing_status.events_status)
Expand Down Expand Up @@ -525,7 +525,7 @@ def PrintExtractionStatusHeader(self, processing_status):
self._output_writer.Write(f'Filter file\t\t: {self._filter_file:s}\n')

processing_time = self._FormatProcessingTime(processing_status)
self._output_writer.Write(f'Processing time\t: {processing_time:s}\n')
self._output_writer.Write(f'Processing time\t\t: {processing_time:s}\n')

self._PrintTasksStatus(processing_status)
self._output_writer.Write('\n')
Expand Down
22 changes: 11 additions & 11 deletions tests/cli/log2timeline_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _CheckOutput(self, output, expected_output):
output = output.split('\n')

self.assertEqual(output[:3], expected_output[:3])
self.assertTrue(output[3].startswith('Processing time\t: '))
self.assertTrue(output[3].startswith('Processing time\t\t: '))
self.assertEqual(output[4:], expected_output[4:])

def _CreateExtractionOptions(self, source_path, password=None):
Expand Down Expand Up @@ -191,7 +191,7 @@ def testExtractEventsFromSourcesOnDirectory(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: directory',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -224,7 +224,7 @@ def testExtractEventsFromSourcesOnAPFSImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -258,7 +258,7 @@ def testExtractEventsFromSourcesOnBDEImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -291,7 +291,7 @@ def testExtractEventsFromSourcesOnCompressedDMGImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -324,7 +324,7 @@ def testExtractEventsFromSourcesImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -359,7 +359,7 @@ def testExtractEventsFromSourcesPartitionedImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -394,7 +394,7 @@ def testExtractEventsFromSourcesOnVSSImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -431,7 +431,7 @@ def testExtractEventsFromSourcesOnFile(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: single file',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -468,7 +468,7 @@ def testExtractEventsFromSourcesOnLinkToDirectory(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: directory',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -503,7 +503,7 @@ def testExtractEventsFromSourcesOnLinkToFile(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: single file',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down
14 changes: 7 additions & 7 deletions tests/cli/psteal_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _CheckOutput(self, output, expected_output):
output = output.split('\n')

self.assertEqual(output[:3], expected_output[:3])
self.assertTrue(output[3].startswith('Processing time\t: '))
self.assertTrue(output[3].startswith('Processing time\t\t: '))
self.assertEqual(output[4:], expected_output[4:])

def testFailWhenOutputAlreadyExists(self):
Expand Down Expand Up @@ -163,7 +163,7 @@ def testExtractEventsFromSourceDirectory(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: directory',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -207,7 +207,7 @@ def testExtractEventsFromSourceBDEImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -248,7 +248,7 @@ def testExtractEventsFromSourcesImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -291,7 +291,7 @@ def testExtractEventsFromSourcePartitionedImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -335,7 +335,7 @@ def testExtractEventsFromSourceVSSImage(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: storage media image',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down Expand Up @@ -380,7 +380,7 @@ def testExtractEventsFromSourceSingleFile(self):
'',
'Source path\t\t: {0:s}'.format(options.source),
'Source type\t\t: single file',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
'Processing started.',
'Processing completed.',
Expand Down
6 changes: 3 additions & 3 deletions tests/cli/status_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _CheckOutput(self, output, expected_output):
output = output.split('\n')

self.assertEqual(output[:4], expected_output[:4])
self.assertTrue(output[4].startswith('Processing time\t: '))
self.assertTrue(output[4].startswith('Processing time\t\t: '))
self.assertEqual(output[5:], expected_output[5:])

# TODO: add tests for _ClearScreen
Expand Down Expand Up @@ -136,7 +136,7 @@ def testPrintExtractionStatusUpdateWindow(self):
'',
'Source path\t\t: /test/source/path',
'Source type\t\t: directory',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
table_header,
('f_identifier '
Expand Down Expand Up @@ -174,7 +174,7 @@ def testPrintExtractionStatusUpdateWindow(self):
'',
'Source path\t\t: /test/source/path',
'Source type\t\t: directory',
'Processing time\t: 00:00:00',
'Processing time\t\t: 00:00:00',
'',
table_header,
('f_identifier '
Expand Down

0 comments on commit 25ec9f7

Please sign in to comment.