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
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
..
_vendor Use unittest.mock instead of mock. (#77883) 3 years ago
ansible_test Avoid deprecated method in unit tests. 3 years ago
cli refactor and fixes for doc parsing (#77719) 2 years ago
compat Remove unit test Python 2.6 compat. (#78369) 2 years ago
config Yolo (#77554) 3 years ago
errors Clean up unit tests. (#78498) 2 years ago
executor Replace get_persistent_connection_options in task_executor with get_options (#74446) 2 years ago
galaxy Relax minimal config to enable manifest functionality (#78574) 2 years ago
inventory Fix pytest collection during test_host partial run 2 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 10 years ago
mock Use unittest.mock instead of mock. (#77883) 3 years ago
module_utils Fix distro fact handling for Flatcar (#77635) 2 years ago
modules Prefer unittest.mock over mock. (#77886) 3 years ago
parsing Remove unit test pytz requirement. (#78368) 2 years ago
playbook Use classproperty to access field attributes of a class (#78180) 2 years ago
plugins refactor and fixes for doc parsing (#77719) 2 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Use unittest.mock instead of mock. (#77883) 3 years ago
utils Skip test if no there are no problematic chars for wcswidth (#78645) 2 years ago
vars Use unittest.mock instead of mock. (#77883) 3 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Update unit test controller requirements. (#78376) 2 years ago
test_constants.py Remove some constants.py deprecated items (#70466) 4 years ago
test_context.py Clean up unit test boilerplate. 4 years ago
test_no_tty.py ansible-test - Fix subprocess management. (#77641) 3 years ago