You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/module_utils/facts
Johanan Liebermann fbd828673d
Fix distro fact handling for Flatcar (#77635)
* Fix distro fact handling for Flatcar

The existence of the file /etc/flatcar/update.conf depends on
bootstrap configuration typically provided by the user. For that
reason this file is unsuitable for determining distro facts for
Flatcar Container Linux.

The distribution_release fact is meaningless in the case of Flatcar
since Flatcar doesn't have named releases. The distribution_version
fact, however, IS meaningful and should contain a number such as
"3139.2.0".

- Use /etc/os-release instead of /etc/flatcar/update.conf.
- Drop the distribution_release fact.
- Set the distribution_version fact.
- Update distro test fixture for Flatcar
- Generate the fixture using gen_distribution_version_testcase.py.
- Override result.distribution and result.os_family manually as the
  generator script gives wrong values.
- Use a recent Flatcar version.

Signed-off-by: Johanan Liebermann <jliebermann@microsoft.com>
2 years ago
..
fixtures
hardware Fix AIX processor facts and add unit test (#78223) 2 years ago
network Prefer unittest.mock over mock. (#77886) 2 years ago
other Prefer unittest.mock over mock. (#77886) 2 years ago
system Fix distro fact handling for Flatcar (#77635) 2 years ago
virtual check /.dockerenv and /.dockerinit to guess a dockercontainer (#74349) 3 years ago
__init__.py
base.py Prefer unittest.mock over mock. (#77886) 2 years ago
test_ansible_collector.py Prefer unittest.mock over mock. (#77886) 2 years ago
test_collector.py Avoid deprecated TestCase functions in unit tests. (#76678) 3 years ago
test_collectors.py Prefer unittest.mock over mock. (#77886) 2 years ago
test_date_time.py Add epoch_int in date_time facts (#73822) 4 years ago
test_facts.py Prefer unittest.mock over mock. (#77886) 2 years ago
test_sysctl.py Prefer unittest.mock over mock. (#77886) 2 years ago
test_timeout.py
test_utils.py Prefer unittest.mock over mock. (#77886) 2 years ago