mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Add tags filter to linode inventory plugin (#1551)
* Add tags filter to linode inventory plugin * add tags to return tuple on line 66 in test_linode.py * Add period in changelog fragment. use if any() rather than for ... if list completion * Clarify the description of the ``tags`` option * Updated description to remove syntax error of line break.
This commit is contained in:
parent
b31583b441
commit
3b9c6d496b
3 changed files with 30 additions and 7 deletions
|
@ -58,18 +58,20 @@ def test_validation_option_bad_option(inventory):
|
|||
|
||||
|
||||
def test_empty_config_query_options(inventory):
|
||||
regions, types = inventory._get_query_options({})
|
||||
assert regions == types == []
|
||||
regions, types, tags = inventory._get_query_options({})
|
||||
assert regions == types == tags == []
|
||||
|
||||
|
||||
def test_conig_query_options(inventory):
|
||||
regions, types = inventory._get_query_options({
|
||||
regions, types, tags = inventory._get_query_options({
|
||||
'regions': ['eu-west', 'us-east'],
|
||||
'types': ['g5-standard-2', 'g6-standard-2'],
|
||||
'tags': ['web-server'],
|
||||
})
|
||||
|
||||
assert regions == ['eu-west', 'us-east']
|
||||
assert types == ['g5-standard-2', 'g6-standard-2']
|
||||
assert tags == ['web-server']
|
||||
|
||||
|
||||
def test_verify_file_bad_config(inventory):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue