Add new group collecting mechanism
diff --git a/cvp_checks/tests/test_packet_checker.py b/cvp_checks/tests/test_packet_checker.py
index 2556bcf..d85e87e 100644
--- a/cvp_checks/tests/test_packet_checker.py
+++ b/cvp_checks/tests/test_packet_checker.py
@@ -6,12 +6,10 @@
@pytest.mark.parametrize(
"group",
- utils.get_groups(os.path.basename(__file__))
+ utils.node_groups.keys()
)
def test_check_package_versions(local_salt_client, group):
- if "skipped" in group:
- pytest.skip("skipped in config")
- output = local_salt_client.cmd(group, 'lowpkg.list_pkgs', expr_form='pcre')
+ output = local_salt_client.cmd("L@"+','.join(utils.node_groups[group]), 'lowpkg.list_pkgs', expr_form='compound')
if len(output.keys()) < 2:
pytest.skip("Nothing to compare - only 1 node")
@@ -44,18 +42,16 @@
@pytest.mark.parametrize(
"group",
- utils.get_groups(os.path.basename(__file__))
+ utils.node_groups.keys()
)
def test_check_module_versions(local_salt_client, group):
- if "skipped" in group:
- pytest.skip("skipped in config")
pre_check = local_salt_client.cmd(
- group, 'cmd.run', ['dpkg -l | grep "python-pip "'], expr_form='pcre')
+ "L@"+','.join(utils.node_groups[group]), 'cmd.run', ['dpkg -l | grep "python-pip "'], expr_form='compound')
if pre_check.values().count('') > 0:
pytest.skip("pip is not installed on one or more nodes")
if len(pre_check.keys()) < 2:
pytest.skip("Nothing to compare - only 1 node")
- output = local_salt_client.cmd(group, 'pip.freeze', expr_form='pcre')
+ output = local_salt_client.cmd("L@"+','.join(utils.node_groups[group]), 'pip.freeze', expr_form='compound')
nodes = []
pkts_data = []