Skip to content
  1. Sep 27, 2022
    • Thomas Woerner's avatar
      ipadnszone: import netaddr and DNSName from ansible_freeipa_module · 75d481c6
      Thomas Woerner authored
      ansible_freeipa_module is providing netaddr and also DNSName, therefore
      it is not needed to have own imports in the module. These own imports
      would need an addional try exception clause to be able to pass the
      ansible-test fake execution test.
      75d481c6
    • Thomas Woerner's avatar
      ipadnsrecord: Fix for ansible-test fake execution test · fe364cc2
      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.
      
      If the imports can not be done, all used and needed attributes are
      defined with the value None, MODULE_IMPORT_ERROR is set to the import
      error and fail_json is called.
      fe364cc2
    • Thomas Woerner's avatar
      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
  2. Sep 16, 2022
  3. Sep 09, 2022
  4. Sep 08, 2022
  5. Sep 07, 2022
  6. Sep 06, 2022
  7. Sep 05, 2022
  8. Sep 03, 2022
    • Rafael Guterres Jeffman's avatar
      upstream CI: run PR tests only for affected plugins · 25141584
      Rafael Guterres Jeffman authored
      The current workflow for bug fixing or new enhancements in
      ansible-freeipa includes running Ansible playbooks tests for all the
      available plugins for every pull request, even for contained
      modifications.
      
      This patch creates a new workflow for pull requests where only the
      affected plugins are tested in the PR. Changes that might affect other
      parts of the code will trigger tests for the parts affected.
      
      A utility script, utils/filter_tests, is used to set the variables
      IPA_ENABLED_MODULES and IPA_ENABLED_TESTS before executing the tests,
      effectively limiting which tests are executed. The script uses the
      python plugin 'utils/filter_plugins.py' which lists all test modules
      that should be executed for a list of modified source files.
      
      Tests are selected for execution based on the plugin name. For example,
      a change to 'plugins/modules/ipalocation.py' would trigger all playbook
      tests under 'tests/location'. If a test playbook is modified, it is
      scheduled to be executed. Changes to any file under
      'plugins/module_utils' will force the execution of all tests, since any
      module might be affected by that change.
      
      The nature of the change is not evaluated, so a simple typo fix of a
      comment in a file under 'plugins/module_utils' would still schedule all
      test playbooks to be executed.
      
      For roles, any file changed under the role directory would set the role
      to be included in the tests. Playbook tests for roles must be created
      under 'tests/<rolename>_role', where role name in the name of the role
      without 'ipa', for example, the 'ipabackup' role test playbooks would
      be stored under 'tests/backup_role'.
      
      Since there is the possibility that the list of tests to be executed
      might be less than the number of tests groups used (3), a new pytest
      dependency was added, pytest-custom_exit_code, so that having no tests
      to run isn't a test failure.
      
      A new pipeline on Azure needs to be created to use the new test script.
      25141584
  9. Aug 31, 2022
  10. Aug 30, 2022
  11. Aug 29, 2022
  12. Aug 26, 2022
  13. Aug 25, 2022