Skip to content

Commit

Permalink
Add hdm to installer's UPSTREAM_SPECIFIC_MODULES & fix comparison (#1…
Browse files Browse the repository at this point in the history
…5833)

* 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.
  • Loading branch information
ekohl authored Aug 15, 2024
1 parent 93bd5ee commit eb91020
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/foreman/installer/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eb91020

Please sign in to comment.