Skip to content
Snippets Groups Projects
  1. Dec 02, 2022
  2. Sep 16, 2022
  3. Sep 09, 2022
    • Rafael Guterres Jeffman's avatar
      ipaconfig: Add support for SID related attributes. · 3c8d6c7c
      Rafael Guterres Jeffman authored
      Since FreeIPA 4.9.8 the 'config_mod' command has parameters to enable
      and configure SIDs, and set the Netbios name.
      
      This patch adds the following parameters to ipaconfig plugin:
          enable_sids: New users and groups automatically get a SID assigned
          add_sids: Add SIDs for existing users and groups
          netbios_name: NetBIOS name of the IPA domain
      
      Both add_sids and netbios_name requires 'enable_sid: yes'.
      
      'enable_sid' and 'netbios_name' are returned when querying IPA
      configuration.
      
      'add_sids' always generate SIDs for users and groups, so, muiltiple
      executions of the playbook with 'add_sids: yes' will return 'changed',
      even if users and groups SIDs are not modified.
      
      A new test playbook is available:
      
          tests/config/test_config_sid.yml
      
      New examples playbooks are available:
      
          playbooks/config/change-ipa-domain-netbios-name.yml
          playbooks/config/generate-users-groups-sids.yml
      
      Fixes: #781
      Related: https://bugzilla.redhat.com/show_bug.cgi?id=2069174
      Related: https://bugzilla.redhat.com/show_bug.cgi?id=2069184
      3c8d6c7c
  4. 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
  5. Aug 31, 2022
    • Rafael Guterres Jeffman's avatar
      tests: Drop pytest-split-tests in favor of pytest-split · b3ee4f9b
      Rafael Guterres Jeffman authored
      The plugin pytest-split-tests is used to split the tests in several
      groups so that the tests can be executed in parallel is upstream CI.
      
      The issue is thet pytest-split-tests last release was more that a
      year ago, upstream developers have not been responsive, and there is
      a bug when the number of tests to be executed by a group is zero.
      The patch to fix this issue has been open for a year.
      
      This patch deprecates the use of pytest-split-tests, changing the
      plugin used to split the tests to pytest-split, which is actively
      mainatined.
      b3ee4f9b
  6. Aug 29, 2022
  7. Aug 24, 2022
    • Rafael Guterres Jeffman's avatar
      upstream ci: Add step to display scenario configuration · abef329b
      Rafael Guterres Jeffman authored
      Since test configuration can vary in different scenarios (test images)
      this patch adds a script to list the scenarios configuration, and a
      step to the playbook test jobs to display the scenario configuration.
      abef329b
    • Rafael Guterres Jeffman's avatar
      upstream ci: Add support for distro specific test configuration. · edccf70b
      Rafael Guterres Jeffman authored
      Sometimes, mostly due do differences in package versions, there are
      some tests that fail on a single distribution which cannot be fixed
      by ansible-freeipa, requiring that the offending package is fixed.
      
      To keep tests running succesfully we have options to disable the
      failing tests, but this changes are globally applied, meaning that, by
      disabling a test, it is disable in all tested distributions.
      
      This patch allows tests to be enabled or disabled for a specific
      distribution, by setting the configuration on the 'variable' template
      for the specific testing scenario.
      edccf70b
  8. Jul 21, 2022
  9. Jul 07, 2022
  10. Jun 23, 2022
  11. Jun 21, 2022
    • Rafael Guterres Jeffman's avatar
      upstream CI: Add support for testing ansible-freeipa as a collection. · f44dc55b
      Rafael Guterres Jeffman authored
      Provide a pipeline to test ansible-freeipa as an Ansible Galaxy
      collection. The tests will use 'utils/build-galaxy-release.sh' to
      create the galaxy release file, install it as a collection, and run
      the tests in it, which were modified to use FQCN.
      
      The tests will run only on 'fedora-latest' for each PR, and on all
      platforms for nightly and weekly tests.
      f44dc55b
  12. Jun 15, 2022
    • Rafael Guterres Jeffman's avatar
    • Rafael Guterres Jeffman's avatar
      upstream tests: Disable dnsconfig and dnsforwardzone · 757b89df
      Rafael Guterres Jeffman authored
      Due to an issue with IPA in Fedora 36, dnsconfig and dnsforwardzone
      plugin tests must be disabled.
      
      See FreeIPA issue: https://pagure.io/freeipa/issue/9158
      757b89df
    • Rafael Guterres Jeffman's avatar
      Add support to define which playbook tests to execute with pytest. · 13cff635
      Rafael Guterres Jeffman authored
      pytest provide the means to skip tests based on patterns, but writing
      these patterns for ansible-freeipa might not be feasible.
      
      This PR allows the selection of playbook tests and modules that will
      be executed with pytest using the environmentt variables IPA_ENABLED_TESTS
      IPA_ENABLED_MODULES, IPA_DISABLED_TESTS or IPA_DISABLED_MODULES.
      
      When using IPA_ENABLED_MODULES, all modules will be disabled, and only
      the modules in the enabled list will be tested. If using the test
      filter, IPA_ENABLED_TESTS, all tests are disabled, unless they are in
      the enabled test lists.
      
      If the IPA_DISABLED_* version is used, tests and modules are enabled by
      default, and the list is used to disable the module or specific test.
      
      To disable a test or module in Azure CI, edit the file
      `tests/azure/variables` and add the desired tests or modules to the
      parameter variables `enabled_modules`, 'enabled_tests`, `disabled_tests`
      or `disable_modules`.
      
      Note that, if added to the `master` branch, this will affect the tests
      for every pipeline that it is include (including 'nightly'), so it should
      be used with care.
      
      It can be used with TEMP commits to enable only the desired tests,
      speeding up upstream tests.
      13cff635
  13. May 12, 2022
  14. Feb 16, 2022
  15. Feb 15, 2022
  16. Feb 03, 2022
  17. Dec 10, 2021
    • Rafael Guterres Jeffman's avatar
      upstream CI: Enable nightly tests using ansible-core 2.12. · 41679822
      Rafael Guterres Jeffman authored
      This patch modifies the Python version used to be the latest available,
      and add stages to execute the tests using ansible-core 2.12. As we
      use Ubuntu 20.04, Python version 3.8 is avaiable.
      
      Previously, ansible-core 2.12 was not available as it cannot be
      installed with Python 3.6, which was the version used.
      41679822
  18. Nov 30, 2021
  19. Nov 29, 2021
  20. Nov 26, 2021
  21. Nov 16, 2021
    • Rafael Guterres Jeffman's avatar
      CI: Test modules against different Ansible versions. · 612b6076
      Rafael Guterres Jeffman authored
      Currently, upstream CI test documentation against different Ansible
      versions, but playbook tests are only executed with Ansible 2.9 series.
      This patch add support for running playbook tests against Ansible 2.9,
      ansible-core 2.11, and against latest version of Ansible.
      
      As running all the tests for every PR would take too long, the tests
      for every PR use only Anisble 2.9, and are executed on Fedora-latest
      and CentOS 7 and 8.
      
      A new pipeline for nightly tests was added, which runs the tests in the
      same distros, using Ansible 2.9, latest and Ansible-core 2.11.
      612b6076
  22. Sep 29, 2021
  23. Jul 08, 2021
    • Rafael Guterres Jeffman's avatar
      build_containers: build CI container images on Sundays. · be1ec1c6
      Rafael Guterres Jeffman authored
      Currently, we rebuild the container images everyday, at midnight,
      which ensures that we have all the latest changes from every distro
      supported in CI.
      
      This approach works fine for the upstream CI, but if we want to use
      the CI images to test modules in a local container, for example, as
      proposed by PR #556, updating the images daily means that there will
      be much more images download that would not be needed, as the public
      cloud images of supported distros don't change so often.
      
      This patch proposes to change the build rate from daily to weekly,
      reducing the need to download images by users, while still using a
      good update window.
      
      It should be noted that, if required, the images can be rebuilt
      manually, so any urgent fix is added to the CI images.
      be1ec1c6
  24. May 25, 2021
    • Thomas Woerner's avatar
      tests/azure: Install community.docker Ansible collection · 7192b6fd
      Thomas Woerner authored
      The test preparation failed with "the connection plugin
      'community.docker.docker' was not found" in "Setup test container".
      
      "ansible-galaxy collection install community.docker" has been added
      to
      
        tests/azure/templates/playbook_tests.yml and
        tests/azure/templates/pytest_tests.yml
      7192b6fd
  25. May 03, 2021
  26. Jan 26, 2021
  27. Sep 02, 2020
Loading