From eb91020801cd234d22a87258c45523ff9ffec7be Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 15 Aug 2024 18:55:32 +0200 Subject: [PATCH] Add hdm to installer's UPSTREAM_SPECIFIC_MODULES & fix comparison (#15833) * Compare installer modules as sets On the right hand side it is `dict_keys() - set()` which results in a set. While you can compare dict_keys and set, the resulting diff isn't very useful because pytest doesn't diff the elements. This converts the left hand side into a set so it's comparing two sets. Technically that's also correct because for us the order doesn't matter either; it's only about the elements. * Add hdm to installer's UPSTREAM_SPECIFIC_MODULES HDM is a new plugin that recently started shipping upstream, but don't ship downstream. --- tests/foreman/installer/test_installer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/foreman/installer/test_installer.py b/tests/foreman/installer/test_installer.py index 55d5c120520..f3968a054aa 100644 --- a/tests/foreman/installer/test_installer.py +++ b/tests/foreman/installer/test_installer.py @@ -49,6 +49,7 @@ 'foreman::plugin::dlm', 'foreman::plugin::expire_hosts', 'foreman::plugin::git_templates', + 'foreman::plugin::hdm', 'foreman::plugin::hooks', 'foreman::plugin::kernel_care', 'foreman::plugin::monitoring', @@ -66,6 +67,7 @@ 'foreman_proxy::plugin::acd', 'foreman_proxy::plugin::dns::powerdns', 'foreman_proxy::plugin::dns::route53', + 'foreman_proxy::plugin::hdm', 'foreman_proxy::plugin::monitoring', 'foreman_proxy::plugin::salt', } @@ -427,7 +429,7 @@ def test_installer_modules_check(target_sat): sat_yaml = yaml.safe_load(sat_output.stdout) upstream_yaml = yaml.safe_load(upstream_output.stdout) - assert sat_yaml.keys() == (upstream_yaml.keys() - UPSTREAM_SPECIFIC_MODULES) + assert set(sat_yaml.keys()) == (upstream_yaml.keys() - UPSTREAM_SPECIFIC_MODULES) @pytest.mark.stubbed