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
Sam Doran 1d91e03119
Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298)
Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.

Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.

* Add changelog

* Add unit tests

Only add tests for Clear Linux parsing since that was the cause of this issue.
2019-03-08 10:40:49 -05:00
..
fixtures Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
hardware parallelize getting mount info (#49398) 2019-01-23 12:33:59 -05:00
network Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
other Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
system Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298) 2019-03-08 10:40:49 -05:00
__init__.py Facts Timeout was not settable via ansible.cfg 2017-05-01 07:59:42 -07:00
base.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_ansible_collector.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_collector.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_collectors.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_facts.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
test_timeout.py Make the timeout decorator raise an exception out of the function's scope (#49921) 2018-12-18 18:01:46 -08:00
test_utils.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00