mirror of
https://github.com/ansible/awx.git
synced 2026-03-05 02:31:03 -03:30
Make lookup plugins return lists to fix failures (#15625)
* Make lookup plugins return lists to fix failures * Update unit tests * Use lookup for test failures, update docs * Grammar fix from review Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> --------- Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
This commit is contained in:
@@ -82,7 +82,7 @@ def test_delete_same_named_schedule(run_module, project, inventory, admin_user):
|
||||
)
|
||||
def test_rrule_lookup_plugin(collection_import, freq, kwargs, expect):
|
||||
LookupModule = collection_import('plugins.lookup.schedule_rrule').LookupModule()
|
||||
generated_rule = LookupModule.get_rrule(freq, kwargs)
|
||||
generated_rule = LookupModule.get_rrule(freq, kwargs)[0]
|
||||
assert generated_rule == expect
|
||||
rrule_checker = SchedulePreviewSerializer()
|
||||
# Try to run our generated rrule through the awx validator
|
||||
@@ -99,7 +99,7 @@ def test_empty_schedule_rrule(collection_import, freq):
|
||||
pfreq = 'DAILY;COUNT=1'
|
||||
else:
|
||||
pfreq = freq.upper() + 'LY'
|
||||
assert LookupModule.get_rrule(freq, {}).endswith(' RRULE:FREQ={0};INTERVAL=1'.format(pfreq))
|
||||
assert LookupModule.get_rrule(freq, {})[0].endswith(' RRULE:FREQ={0};INTERVAL=1'.format(pfreq))
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user