Skip to content

Conversation

@rjeffman
Copy link
Member

This PR enables deployment roles testing using Github workflows.

The tests run only when one of the roles (ipaclient, ipaserver or ipareplica) is modified and run some basic tests against the deployed role.

There's still an issue either with the combination of the software stack used (Github's Ubuntu 24.04 + our images), or the tooling used to enable the tests, that required a few changes in the tests.

See the individual commits for more details.

@rjeffman rjeffman force-pushed the test_deployment_roles branch 3 times, most recently from fe38a77 to 3edf0a6 Compare January 2, 2025 23:58
rjeffman added 3 commits June 6, 2025 10:43
This patch sets 'become: false' usage in the tests:

    tests/group/test_group.yml
    tests/hbacrule/test_hbacrule.yml
    tests/host/test_host.yml
    tests/user/test_user.yml

With this setting, the tests can be executed with Ubuntu 24.04 runners
in Github workflows.

There's a still unknown issue with Ubuntu 24.04 and Github workflows
that does not allow 'sudo' tu execute properly, so 'become' fails in
Ansible, even for common tasks like 'gather_facts'.

While there's no workaround, and as we should only use 'become: false'
when really required (least privileges principle), these tests will be
changed so they can be used to test cluster deployment.

Signed-off-by: Rafael Guterres Jeffman <[email protected]>
This patch enables testing deployment roles using FreeIPA-Cluster-Test
action (https://github.com/rjeffman/freeipa/cluster-tests).

The tests require a cluster configuration to be used with ipalab-config
(https://pypi.org/project/ipalab-config) and a list of Ansible
playbooks. To ensure the proper host runs the tests, 'ipa-test-host' is
set using a vars file, and passed to the action.

The tests run on Github actions, only if one of the deployment roles are
modified by the PR.
@rjeffman rjeffman force-pushed the test_deployment_roles branch from 3edf0a6 to 7de610c Compare June 6, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant