You can see that some of these may be easier than others. However, even between the two of these, there are only a tiny handful of unique HAS_ variables. While those are duplicated a lot, they tend to still have definitions in module_utils.
seem to be completely unnecessary and could be removed. So that supports the argument that we could just focus on verifying that the HAS_ variables from module_utils are True.
We need integration testing for this obviously, and we don't yet have a framework for that.
Throwing an idea out into the possibilities:
Introduce custom module which will attempt to import a variable or module, given in parameters.
Do the relatively simple task of cataloging the
HAS_*
variables in each collection, ex:You can see that some of these may be easier than others. However, even between the two of these, there are only a tiny handful of unique HAS_ variables. While those are duplicated a lot, they tend to still have definitions in module_utils.
The re-definition in individual modules like:
https://github.com/ansible-collections/vmware/blob/main/plugins/modules/vmware_vsan_health_info.py#L105
seem to be completely unnecessary and could be removed. So that supports the argument that we could just focus on verifying that the HAS_ variables from module_utils are
True
.