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/tests
steven jacobs 386bb4bdd5
Fix linode inventory filtering (#4336)
* Fix linode inventory filtering

There was a regression introduced in the addition of caching. The
`_consume_options` method was added and provided the `config_data`
dictionary. This `pop`s every entry, resulting in an empty `config_data`
dict, which was then reused and expected to be populated.

After reviewing, `_consume_data` doesn't need to be called. Also, once
the ``_read_config_data` method has been called, we no longer need the
config_data dict, and can instead use the `get_option` method throughout.

Once those were removed, the filtering function seemed a bit odd, since
we were no longer using the file. I used that opportunity to move the
filter calls into the populate function directly.

* Remove tests that target removed methods

This removes tests that targeted some custom methods on configuration
file handling. These are no longer necessary since they are now handled
by the BaseInventoryPlugin `_read_config_data` method.

* Add changelog entry for linode inventory bugfix

* Revert filters back to their own method

This moves filters back into their own method, but now uses the
get_option calls to pull filter configuration items.
2022-03-14 20:38:32 +01:00
..
integration/targets pacman: add support for remove_nosave (#4316) 2022-03-08 07:21:40 +01:00
sanity Allow YAML docs in plugins/test/ and plugins/filters/. (#4204) 2022-02-17 13:53:01 +01:00
unit Fix linode inventory filtering (#4336) 2022-03-14 20:38:32 +01:00
utils CI: Add ArchLinux, Debian Bullseye, CentOS Stream 8, and Alpine 3 (#4222) 2022-02-21 21:14:45 +01:00
.gitignore
config.yml
requirements.yml