[2.5][Backport] AAP 30045 incorrect deprecation warning for awx.awx.schedule rrule (#6903)

* 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>

* Fix cherry-pick merge issue, should resolve failing linter

---------

Co-authored-by: Alan Rominger <arominge@redhat.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
This commit is contained in:
Lila Yasin
2025-04-11 11:02:45 -04:00
committed by GitHub
parent d35d7f62ec
commit bbcdef18a7
7 changed files with 45 additions and 65 deletions

View File

@@ -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(