ansible icon indicating copy to clipboard operation
ansible copied to clipboard

runtime-metadata sanity test: ensure redirects are FQCRs

Open felixfontein opened this issue 3 years ago • 1 comments

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

felixfontein avatar Sep 18 '22 12:09 felixfontein

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'

click here for bot help

ansibot avatar Sep 18 '22 12:09 ansibot

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),

click here for bot help

ansibot avatar Sep 23 '22 06:09 ansibot

@felixfontein Thanks for adding this.

s-hertel avatar Sep 26 '22 11:09 s-hertel

@s-hertel thanks a lot for reviewing and merging this!

felixfontein avatar Sep 26 '22 16:09 felixfontein