From c470eb17ffd4cbf8bf9d3c8c1847251ca6076c4c Mon Sep 17 00:00:00 2001 From: jiazhang Date: Mon, 25 Nov 2024 19:09:32 +0800 Subject: [PATCH] Add test coverage Signed-off-by: jiazhang rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED --- insights/specs/default.py | 2 +- insights/tests/parsers/test_nmcli.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/insights/specs/default.py b/insights/specs/default.py index f4a984747..1241c7985 100644 --- a/insights/specs/default.py +++ b/insights/specs/default.py @@ -63,11 +63,11 @@ ls, lsattr, luks_devices, - nmcli, machine_ids, md5chk, mdadm, mount as mount_ds, + nmcli, package_provides, ps as ps_datasource, rpm_pkgs, diff --git a/insights/tests/parsers/test_nmcli.py b/insights/tests/parsers/test_nmcli.py index 2e1151039..06d0ea943 100644 --- a/insights/tests/parsers/test_nmcli.py +++ b/insights/tests/parsers/test_nmcli.py @@ -225,6 +225,9 @@ def test_nmcli_conn_show_uuids(): assert nmcli_conn_show_uuid_obj['ipv4.dhcp-vendor-class-identifier'] == "--" assert nmcli_conn_show_uuid_obj['DHCP4.OPTION[2]'] == "dhcp_lease_time = 86400" + with pytest.raises(SkipComponent): + NmcliConnShowUuids(context_wrap("")) + def test_nmcli_sos(): nmcli_obj = NmcliDevShowSos(context_wrap(NMCLI_SHOW_SOS))