mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Make ansible_selinux facts a consistent type (#31065)
* Make ansible_selinux facts a consistent type Rather than returning a bool if the Python library is missing, return a dict with one key containing a message explaining there is no way to tell the status of SELinux on the system becasue the Python library is not present. * Fix unit test
This commit is contained in:
parent
488534b906
commit
e7902d888c
2 changed files with 12 additions and 7 deletions
|
@ -278,7 +278,7 @@ class TestSelinuxFacts(BaseFactsTest):
|
|||
fact_collector = self.collector_class()
|
||||
facts_dict = fact_collector.collect(module=module)
|
||||
self.assertIsInstance(facts_dict, dict)
|
||||
self.assertFalse(facts_dict['selinux'])
|
||||
self.assertEqual(facts_dict['selinux']['status'], 'Missing selinux Python library')
|
||||
return facts_dict
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue