From a7c87f9ee6df68923aea0bf8ca536f72b51aa974 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Fri, 26 May 2023 15:26:20 -0400 Subject: [hostname] Add new prepper Adds a new Prepper for handling hostname determination for preparing the mapping and parser. As part of this new prepper, pass the CLI options to each prepper for use. Signed-off-by: Jake Hunsaker --- tests/unittests/cleaner_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/unittests/cleaner_tests.py b/tests/unittests/cleaner_tests.py index 6e0be6c8..8bf1b239 100644 --- a/tests/unittests/cleaner_tests.py +++ b/tests/unittests/cleaner_tests.py @@ -24,7 +24,7 @@ from sos.cleaner.preppers import SoSPrepper from sos.cleaner.preppers.hostname import HostnamePrepper from sos.cleaner.preppers.ip import IPPrepper from sos.cleaner.archives.sos import SoSReportArchive - +from sos.options import SoSOptions class CleanerMapTests(unittest.TestCase): @@ -288,13 +288,13 @@ class PrepperTests(unittest.TestCase): """ def setUp(self): - self.prepper = SoSPrepper() + self.prepper = SoSPrepper(SoSOptions()) self.archive = SoSReportArchive( archive_path='tests/test_data/sosreport-cleanertest-2021-08-03-qpkxdid.tar.xz', tmpdir='/tmp' ) - self.host_prepper = HostnamePrepper() - self.ipv4_prepper = IPPrepper() + self.host_prepper = HostnamePrepper(SoSOptions(domains=[])) + self.ipv4_prepper = IPPrepper(SoSOptions()) def test_parser_method_translation(self): self.assertEqual([], self.prepper.get_parser_file_list('hostname', None)) -- cgit