Skip to content

Commit

Permalink
Added ISO-9660 analyzer test (log2timeline#695)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Sep 18, 2022
1 parent 5bcde4c commit 1b88b32
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions tests/analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def testGetFileSystemTypeIndicators(self):
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsEXT2(self):
"""Tests the GetFileSystemTypeIndicators function on an ext2 file system."""
"""Tests the GetFileSystemTypeIndicators function on ext2."""
test_file = self._GetTestFilePath(['ext2.raw'])
self._SkipIfPathNotExists(test_file)

Expand All @@ -191,7 +191,7 @@ def testGetFileSystemTypeIndicatorsEXT2(self):
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsFAT12(self):
"""Tests the GetFileSystemTypeIndicators function on a FAT12 file system."""
"""Tests the GetFileSystemTypeIndicators function on FAT-12."""
test_file = self._GetTestFilePath(['fat12.raw'])
self._SkipIfPathNotExists(test_file)

Expand All @@ -202,8 +202,20 @@ def testGetFileSystemTypeIndicatorsFAT12(self):
type_indicators = analyzer.Analyzer.GetFileSystemTypeIndicators(path_spec)
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsISO9660(self):
"""Tests the GetFileSystemTypeIndicators function on ISO-9660."""
test_file = self._GetTestFilePath(['iso9660.raw'])
self._SkipIfPathNotExists(test_file)

path_spec = os_path_spec.OSPathSpec(location=test_file)
path_spec = raw_path_spec.RawPathSpec(parent=path_spec)

expected_type_indicators = [definitions.TYPE_INDICATOR_TSK]
type_indicators = analyzer.Analyzer.GetFileSystemTypeIndicators(path_spec)
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsHFSPlus(self):
"""Tests the GetFileSystemTypeIndicators function on a HFS+ file system."""
"""Tests the GetFileSystemTypeIndicators function on HFS+."""
test_file = self._GetTestFilePath(['hfsplus.raw'])
self._SkipIfPathNotExists(test_file)

Expand All @@ -215,7 +227,7 @@ def testGetFileSystemTypeIndicatorsHFSPlus(self):
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsNTFS(self):
"""Tests the GetFileSystemTypeIndicators function on a NTFS file system."""
"""Tests the GetFileSystemTypeIndicators function on NTFS."""
test_file = self._GetTestFilePath(['ntfs.raw'])
self._SkipIfPathNotExists(test_file)

Expand All @@ -227,7 +239,7 @@ def testGetFileSystemTypeIndicatorsNTFS(self):
self.assertEqual(type_indicators, expected_type_indicators)

def testGetFileSystemTypeIndicatorsXFS(self):
"""Tests the GetFileSystemTypeIndicators function on an XFS file system."""
"""Tests the GetFileSystemTypeIndicators function on XFS."""
test_file = self._GetTestFilePath(['xfs.raw'])
self._SkipIfPathNotExists(test_file)

Expand Down

0 comments on commit 1b88b32

Please sign in to comment.