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/unit/plugins
patchback[bot] 4d74aa05a8
Fix linode inventory filtering (#4336) (#4356)
* 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.

(cherry picked from commit 386bb4bdd5)

Co-authored-by: steven jacobs <stjacobs@fastmail.fm>
2022-03-14 20:56:13 +01:00
..
become Use become test framework for sudosu tests. (#2629) 2021-05-26 10:34:35 +02:00
cache redis cache - better parsing of connection uri (#2579) 2021-05-26 07:07:09 +02:00
callback [opentelemetry][callback] Support loops error handling (#3599) 2021-10-27 07:51:49 +02:00
connection Removal of docker content for 2.0.0 (#1304) 2020-11-23 13:03:19 +01:00
inventory Fix linode inventory filtering (#4336) (#4356) 2022-03-14 20:56:13 +01:00
lookup RevBits PAM Secret Server Plugin (#3405) (#3771) 2021-11-22 19:26:48 +01:00
module_utils Remove and redirect all infoblox/nios content (#3592) 2021-10-21 08:02:06 +02:00
modules pacman: improve docs, make sure that packages is always returned, deprecate update_cache behavior (#4330) (#4342) 2022-03-11 06:15:41 +00:00
__init__.py Initial commit 2020-03-09 09:11:07 +00:00