Skip to content
Snippets Groups Projects
  • Thomas Woerner's avatar
    71f3f110
    ansible_freeipa_module: Fix ansible-test fake execution test findings · 71f3f110
    Thomas Woerner authored
    All imports that are only available after installing IPA need to be in a
    try exception clause to be able to pass the fake execution test. The old
    workaround "if 'ansible.executor' in sys.modules:" is not working with
    this test anymore.
    
    If the imports can not be done, all used and needed attributes are
    defines with the value None.
    
    A check has been added to IPAAnsibleModule.__init__ to make sure that it
    fails if the imports have not been done successfully.
    71f3f110
    History
    ansible_freeipa_module: Fix ansible-test fake execution test findings
    Thomas Woerner authored
    All imports that are only available after installing IPA need to be in a
    try exception clause to be able to pass the fake execution test. The old
    workaround "if 'ansible.executor' in sys.modules:" is not working with
    this test anymore.
    
    If the imports can not be done, all used and needed attributes are
    defines with the value None.
    
    A check has been added to IPAAnsibleModule.__init__ to make sure that it
    fails if the imports have not been done successfully.