def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddFile(u'/etc/passwd', self._FILE_DATA) mount_point = fake_path_spec.FakePathSpec(location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddSymbolicLink( u'/private/etc/localtime', u'/usr/share/zoneinfo/Europe/Amsterdam') mount_point = fake_path_spec.FakePathSpec(location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddFile(u'/Windows/System32/config/SYSTEM', self._FILE_DATA) mount_point = path_spec_factory.Factory.NewPathSpec( dfvfs_definitions.TYPE_INDICATOR_FAKE, location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddFile( u'/Library/Preferences/SystemConfiguration/preferences.plist', self._FILE_DATA) mount_point = fake_path_spec.FakePathSpec(location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddTestFile( u'/private/var/db/dslocal/nodes/Default/users/nobody.plist', [u'com.apple.HIToolbox.plist']) mount_point = fake_path_spec.FakePathSpec(location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddTestFile( u'/Library/Preferences/com.apple.HIToolbox.plist', [u'com.apple.HIToolbox.plist']) mount_point = fake_path_spec.FakePathSpec(location=u'/') self._searcher = file_system_searcher.FileSystemSearcher( file_system_builder.file_system, mount_point)
def setUp(self): """Makes preparations before running an individual test.""" path_attributes = {u'systemroot': u'\\Windows'} file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddTestFile(u'/Windows/System32/config/SYSTEM', [u'SYSTEM']) mount_point = path_spec_factory.Factory.NewPathSpec( dfvfs_definitions.TYPE_INDICATOR_FAKE, location=u'/') registry_file_reader = manager.FileSystemWinRegistryFileReader( file_system_builder.file_system, mount_point, path_attributes=path_attributes) self._win_registry = dfwinreg_registry.WinRegistry( registry_file_reader=registry_file_reader)
def __init__(self, path_spec_queue, event_object_queue, parse_error_queue): """Initialize the engine object. Args: path_spec_queue: the path specification queue object (instance of Queue). event_object_queue: the event object queue object (instance of Queue). parse_error_queue: the parser error queue object (instance of Queue). """ super(TestEngine, self).__init__(path_spec_queue, event_object_queue, parse_error_queue) file_system_builder = shared_test_lib.FakeFileSystemBuilder() file_system_builder.AddTestFile(u'/Windows/System32/config/SOFTWARE', [u'SOFTWARE']) file_system_builder.AddTestFile(u'/Windows/System32/config/SYSTEM', [u'SYSTEM']) self._file_system = file_system_builder.file_system self._mount_point = path_spec_factory.Factory.NewPathSpec( dfvfs_definitions.TYPE_INDICATOR_FAKE, location=u'/')