From 6e5ded510da067196573f91ae0a78272e9251774 Mon Sep 17 00:00:00 2001 From: Xiangce Liu Date: Thu, 10 Oct 2024 14:28:21 +0800 Subject: [PATCH] chore: remove useless lines and hostnames from tests and doc (#4244) - remove duplicate but useless test input in test_lvs - remove unknow hostnames from tests and docstring Signed-off-by: Xiangce Liu --- insights/parsers/dig.py | 4 ++-- insights/tests/parsers/test_dig.py | 8 ++++---- insights/tests/parsers/test_lvs.py | 21 --------------------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/insights/parsers/dig.py b/insights/parsers/dig.py index cfbec36c0d..eebd3cdebf 100644 --- a/insights/parsers/dig.py +++ b/insights/parsers/dig.py @@ -115,7 +115,7 @@ class DigEdns(Dig): ;. IN SOA ;; ANSWER SECTION: - . 19766 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017120600 1800 900 604800 86400 + . 19766 IN SOA a.root-servers.net. abc.com. 2017120600 1800 900 604800 86400 ;; Query time: 22 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) @@ -151,7 +151,7 @@ class DigNoedns(Dig): ;. IN SOA ;; ANSWER SECTION: - . 20195 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017120600 1800 900 604800 86400 + . 20195 IN SOA a.root-servers.net. abc.com. 2017120600 1800 900 604800 86400 ;; Query time: 22 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) diff --git a/insights/tests/parsers/test_dig.py b/insights/tests/parsers/test_dig.py index 7752eb1916..fb88cd76e0 100644 --- a/insights/tests/parsers/test_dig.py +++ b/insights/tests/parsers/test_dig.py @@ -82,7 +82,7 @@ ;. IN SOA ;; ANSWER SECTION: -. 19766 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017120600 1800 900 604800 86400 +. 19766 IN SOA a.root-servers.net. abc.com. 2017120600 1800 900 604800 86400 ;; Query time: 22 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) @@ -101,7 +101,7 @@ ;. IN SOA ;; ANSWER SECTION: -. 19766 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017120600 1800 900 604800 86400 +. 19766 IN SOA a.root-servers.net. abc.com. 2017120600 1800 900 604800 86400 ;; Query time: 22 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) @@ -118,7 +118,7 @@ ;. IN SOA ;; ANSWER SECTION: -. 20195 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017120600 1800 900 604800 86400 +. 20195 IN SOA a.root-servers.net. abc.com. 2017120600 1800 900 604800 86400 ;; Query time: 22 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) @@ -137,7 +137,7 @@ ;; AUTHORITY SECTION: com. 900 IN SOA a.gtld-servers.net. -nstld.verisign-grs.com. 1508851057 1800 900 604800 86400 +abc.com. 1508851057 1800 900 604800 86400 ;; Query time: 29 msec ;; SERVER: 10.38.5.26#53(10.38.5.26) diff --git a/insights/tests/parsers/test_lvs.py b/insights/tests/parsers/test_lvs.py index fe65b918bf..d0ad4cd5ea 100644 --- a/insights/tests/parsers/test_lvs.py +++ b/insights/tests/parsers/test_lvs.py @@ -53,27 +53,6 @@ Unrecognised field: data_percent """.strip() -LVS_INFO_ERROR = """ - WARNING: Locking disabled. Be careful! This could corrupt your metadata. - Logical Volume Fields - --------------------- - lv_all - All fields in this section. - lv_uuid - Unique identifier. - lv_name - Name. LVs created for internal us - Physical Volume Label Fields - ---------------------------- - pv_all - All fields in this section. - pv_fmt - Type of metadata. - pv_uuid - Unique identifier. - Physical Volume Segment Fields - ------------------------------ - pvseg_all - All fields in this section. - pvseg_start - Physical Extent number of start of segment. - pvseg_size - Number of extents in segment. - - Unrecognised field: data_percent -""".strip() - LVS_ROOT_INFO = { "MergeFailed": "unknown", "#Seg": "1",