Intentional coverage, incidental_azure_rm_resource (#71052)

Change:
- Adds some intentional coverage around PluginLoader for cases that
  incidental_azure_rm_resource covered.
- Specifically, modules starting with an underscore, and starting with
  an underscore but a symlink.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
Rick Elrod 2020-08-04 12:53:31 -05:00 committed by GitHub
parent 8af3079640
commit cdcf0aa42a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1 @@
_underscore.py

View file

@ -0,0 +1,13 @@
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
def main():
print(json.dumps(dict(changed=False, source='legacy_library_dir')))
if __name__ == '__main__':
main()

View file

@ -0,0 +1,15 @@
- hosts: testhost
gather_facts: false
tasks:
- name: Load a deprecated module
underscore:
register: res
- name: Load a deprecated module that is a symlink
symlink:
register: sym
- assert:
that:
- res.source == 'legacy_library_dir'
- sym.source == 'legacy_library_dir'