enable collections module_utils subpkg tests (#69957)
* fixed by collection loader rewrite, just needed to be reenabled
This commit is contained in:
parent
843751a00d
commit
16796a6170
2 changed files with 8 additions and 6 deletions
|
@ -6,17 +6,17 @@ import json
|
|||
import sys
|
||||
|
||||
from ansible_collections.testns.testcoll.plugins.module_utils import leaf, secondary
|
||||
# FIXME: these don't work yet under collections
|
||||
# from ansible_collections.testns.testcoll.plugins.module_utils.subpkg import submod
|
||||
# from ansible_collections.testns.testcoll.plugins.module_utils.subpkg_with_init import thingtocall as spwi_thingtocall
|
||||
from ansible_collections.testns.testcoll.plugins.module_utils.subpkg import submod
|
||||
from ansible_collections.testns.testcoll.plugins.module_utils.subpkg_with_init import thingtocall as spwi_thingtocall
|
||||
|
||||
|
||||
def main():
|
||||
mu_result = leaf.thingtocall()
|
||||
mu2_result = secondary.thingtocall()
|
||||
# mu3_result = submod.thingtocall()
|
||||
# mu4_result = spwi_thingtocall()
|
||||
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result, mu2_result=mu2_result)))
|
||||
mu3_result = submod.thingtocall()
|
||||
mu4_result = spwi_thingtocall()
|
||||
print(json.dumps(dict(changed=False, source='user', mu_result=mu_result, mu2_result=mu2_result,
|
||||
mu3_result=mu3_result, mu4_result=mu4_result)))
|
||||
|
||||
sys.exit()
|
||||
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
- flat_out.mu_result == 'thingtocall in leaf'
|
||||
- from_out.mu_result == 'thingtocall in leaf'
|
||||
- from_out.mu2_result == 'thingtocall in secondary'
|
||||
- from_out.mu3_result == 'thingtocall in subpkg.submod'
|
||||
- from_out.mu4_result == 'thingtocall in subpkg_with_init'
|
||||
- from_nested_func.mu_result == 'hello from nested_same'
|
||||
- from_nested_module.mu_result == 'hello from nested_same'
|
||||
|
||||
|
|
Loading…
Reference in a new issue