Skip to content

Commit

Permalink
Changes to structure of test_data directory log2timeline#4798 (log2ti…
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Mar 24, 2024
1 parent 92a1b5c commit e773532
Show file tree
Hide file tree
Showing 24 changed files with 19 additions and 16 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file modified test_data/macos_launchd.log
100755 → 100644
Empty file.
File renamed without changes.
3 changes: 2 additions & 1 deletion tests/analysis/browser_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def testExamineEventAndCompileReport(self):
parser = sqlite.SQLiteParser()
plugin = browser_search.BrowserSearchPlugin()

storage_writer = self._ParseAndAnalyzeFile(['History'], parser, plugin)
storage_writer = self._ParseAndAnalyzeFile(
['chrome_history', 'History'], parser, plugin)

analysis_results = list(storage_writer.GetAttributeContainers(
'browser_search_analysis_result'))
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/line_reader_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def testReadlinesWithSizeHint(self):

def testReadlinesWithFileWithoutNewLineAtEnd(self):
"""Test reading lines from a file without a new line char at the end."""
test_file_path = self._GetTestFilePath(['bodyfile'])
test_file_path = self._GetTestFilePath(['bodyfile', 'bodyfile'])
self._SkipIfPathNotExists(test_file_path)

test_path_spec = os_path_spec.OSPathSpec(location=test_file_path)
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/bodyfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class BodyfileTest(test_lib.ParserTestCase):
def testParse(self):
"""Tests the Parse function."""
parser = bodyfile.BodyfileParser()
storage_writer = self._ParseFile(['bodyfile'], parser)
storage_writer = self._ParseFile(['bodyfile', 'bodyfile'], parser)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -50,7 +50,7 @@ def testParse(self):
def testParseOnCorruptFile(self):
"""Tests the Parse function on a corrupt bodyfile."""
parser = bodyfile.BodyfileParser()
storage_writer = self._ParseFile(['bodyfile.corrupt'], parser)
storage_writer = self._ParseFile(['bodyfile', 'bodyfile.corrupt'], parser)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/cookie_plugins/ganalytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def testParsingFirefox29CookieDatabase(self):
"""Tests the Process function on a Firefox 29 cookie database file."""
plugin = firefox_cookies.FirefoxCookie2Plugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['firefox_2_cookies.sqlite'], plugin)
['firefox_cookies', 'firefox_2_cookies.sqlite'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down
6 changes: 4 additions & 2 deletions tests/parsers/olecf_plugins/automatic_destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def testProcessVersion1(self):
"""Tests the Process function on version 1 .automaticDestinations-ms."""
plugin = automatic_destinations.AutomaticDestinationsOLECFPlugin()
storage_writer = self._ParseOLECFFileWithPlugin(
['1b4dd67f29cb1962.automaticDestinations-ms'], plugin)
['automatic_destinations', '1b4dd67f29cb1962.automaticDestinations-ms'],
plugin)

# Number of events:
# olecf:dest_list:entry: 11
Expand Down Expand Up @@ -86,7 +87,8 @@ def testProcessVersion3(self):
"""Tests the Process function on version 3 .automaticDestinations-ms."""
plugin = automatic_destinations.AutomaticDestinationsOLECFPlugin()
storage_writer = self._ParseOLECFFileWithPlugin(
['9d1f905ce5044aee.automaticDestinations-ms'], plugin)
['automatic_destinations', '9d1f905ce5044aee.automaticDestinations-ms'],
plugin)

# Event data types:
# olecf:dest_list:entry: 2
Expand Down
10 changes: 5 additions & 5 deletions tests/parsers/sqlite_plugins/chrome_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def testProcess(self):
"""Tests the Process function on a Chrome History database file."""
plugin = chrome_history.GoogleChrome8HistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['History'], plugin)
['chrome_history', 'History'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -65,7 +65,7 @@ def testProcess57(self):
"""Tests the Process function on a Google Chrome 57 History database."""
plugin = chrome_history.GoogleChrome27HistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['History-57.0.2987.133'], plugin)
['chrome_history', 'History-57.0.2987.133'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -114,7 +114,7 @@ def testProcess58(self):
"""Tests the Process function on a Google Chrome 58 History database."""
plugin = chrome_history.GoogleChrome27HistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['History-58.0.3029.96'], plugin)
['chrome_history', 'History-58.0.3029.96'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -163,7 +163,7 @@ def testProcess59(self):
"""Tests the Process function on a Google Chrome 59 History database."""
plugin = chrome_history.GoogleChrome27HistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['History-59.0.3071.86'], plugin)
['chrome_history', 'History-59.0.3071.86'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -215,7 +215,7 @@ def testProcess59ExtraColumn(self):
"""
plugin = chrome_history.GoogleChrome27HistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['History-59_added-fake-column'], plugin)
['chrome_history', 'History-59_added-fake-column'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/sqlite_plugins/firefox_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def testProcess(self):
"""Tests the Process function."""
plugin = firefox_cookies.FirefoxCookie2Plugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['firefox_2_cookies.sqlite'], plugin)
['firefox_cookies', 'firefox_2_cookies.sqlite'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -52,7 +52,7 @@ def testProcess(self):
"""Tests the Process function."""
plugin = firefox_cookies.FirefoxCookie10Plugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['firefox_10_cookies.sqlite'], plugin)
['firefox_cookies', 'firefox_10_cookies.sqlite'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/sqlite_plugins/firefox_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def testProcessPriorTo24(self):
# This is probably version 23 but potentially an older version.
plugin = firefox_history.FirefoxHistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['places.sqlite'], plugin)
['firefox_history', 'places.sqlite'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down Expand Up @@ -89,7 +89,7 @@ def testProcessVersion25(self):
"""Tests the Process function on a Firefox History database file v 25."""
plugin = firefox_history.FirefoxHistoryPlugin()
storage_writer = self._ParseDatabaseFileWithPlugin(
['places_new.sqlite'], plugin)
['firefox_history', 'places_new.sqlite'], plugin)

number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
'event_data')
Expand Down

0 comments on commit e773532

Please sign in to comment.