summaryrefslogtreecommitdiffstats
path: root/test/units/module_utils/facts/test_collectors.py
diff options
context:
space:
mode:
authorSam Doran <sdoran@ansible.com>2017-10-05 15:19:08 +0200
committerGitHub <noreply@github.com>2017-10-05 15:19:08 +0200
commite7902d888c2b42b5834328200fcfbf94484219cd (patch)
tree5d3328647d20f3ce15eb75f38748146637ac2be7 /test/units/module_utils/facts/test_collectors.py
parentyum: add integration test for incompatible arch rpm (#31185) (diff)
downloadansible-e7902d888c2b42b5834328200fcfbf94484219cd.tar.xz
ansible-e7902d888c2b42b5834328200fcfbf94484219cd.zip
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
Diffstat (limited to 'test/units/module_utils/facts/test_collectors.py')
-rw-r--r--test/units/module_utils/facts/test_collectors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/units/module_utils/facts/test_collectors.py b/test/units/module_utils/facts/test_collectors.py
index 4e00b40c03..6311934c3b 100644
--- a/test/units/module_utils/facts/test_collectors.py
+++ b/test/units/module_utils/facts/test_collectors.py
@@ -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