1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/units/module_utils/facts
Adam Miller 562ff66a98 Fix pkg_mgr_name fact finding for Fedora (#40922)
* Properly handle default package manager vs apt

For distros where apt might be installed but is not the default
package manager for the distro, properly identify the default distro
package manager during fact finding and re-use fact finding from
DistributionFactCollector and instead of reimplementing small
portions of it in PkgMgrFactCollector

Add unit test to always check the apt + Fedora combination to test
the new code.

Fixes #34014

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output I accidentally left behind

Signed-off-by: Adam Miller <admiller@redhat.com>

* add os_family to the conditional so we're only hitting that code path when needed

Signed-off-by: Adam Miller <admiller@redhat.com>

* setup for a _check* pattern for general os_family group pkg_mgr checking

Signed-off-by: Adam Miller <admiller@redhat.com>

* use Mock.patch decorator for os.path.exists in TestPkgMgrFactsAptFedora

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-07-23 10:56:09 -04:00
..
fixtures Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
hardware facts: fix device uuid's on el6 (#36128) 2018-02-16 10:52:51 -05:00
network Support NetBSD 7.1+ style ifconfig -a output (#25442) 2017-06-08 17:09:22 -04:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
__init__.py Facts Timeout was not settable via ansible.cfg 2017-05-01 07:59:42 -07:00
base.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
test_ansible_collector.py Fix pkg_mgr_name fact finding for Fedora (#40922) 2018-07-23 10:56:09 -04:00
test_collector.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
test_collectors.py Fix pkg_mgr_name fact finding for Fedora (#40922) 2018-07-23 10:56:09 -04:00
test_facts.py facts: fix device uuid's on el6 (#36128) 2018-02-16 10:52:51 -05:00
test_timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
test_utils.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00