runtime-metadata sanity test: ensure redirects are FQCRs
SUMMARY
Now that #78755 makes ansible-core fail when it encounters a meta/runtime.yml redirect that is not a FQCR, update the runtime-metadata sanity test to prevent collections from accidentally adding these.
Also fixes crash when meta/runtime.yml accidentally starts with foo--- instead of --- (happens when someone types something in the wrong window...).
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
ansible-test
The test ansible-test sanity --test runtime-metadata [explain] failed with 1 error:
lib/ansible/config/ansible_builtin_runtime.yml:0:0: Must be a FQCR for dictionary value @ data['plugin_routing']['module_utils']['remote_management.dellemc']['redirect']. Got 'dellemc.openmanage'
The test ansible-test sanity --test pylint [explain] failed with 1 error:
test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py:222:48: fixme: TODO: use something like Any(fqcr, collection_name),
@felixfontein Thanks for adding this.
@s-hertel thanks a lot for reviewing and merging this!