From 16796a6170db1298838e0157f4fd2e5fa8d47638 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Mon, 15 Jun 2020 09:34:25 -0700 Subject: enable collections module_utils subpkg tests (#69957) * fixed by collection loader rewrite, just needed to be reenabled --- .../plugins/modules/uses_leaf_mu_module_import_from.py | 12 ++++++------ test/integration/targets/collections/posix.yml | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_module_import_from.py b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_module_import_from.py index 3cb946b7b4..263a354d02 100644 --- a/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_module_import_from.py +++ b/test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_module_import_from.py @@ -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() diff --git a/test/integration/targets/collections/posix.yml b/test/integration/targets/collections/posix.yml index ab74aedb23..74a796cecf 100644 --- a/test/integration/targets/collections/posix.yml +++ b/test/integration/targets/collections/posix.yml @@ -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' -- cgit v1.2.3