Skip to content

Commit

Permalink
Added ipareplica and ipaclient tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Guterres Jeffman committed Dec 31, 2024
1 parent 2e55374 commit 4cbdf4f
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 44 deletions.
106 changes: 75 additions & 31 deletions .github/workflows/test_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- push
- pull_request
env:
test_path: "${HOME}/.ansible/collections/ansible_collections/freeipa/ansible_freeipa"
test_path: ".galaxy_bulid"

jobs:
check_roles:
Expand Down Expand Up @@ -44,23 +44,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- fedora-latest
- c10s
cluster_config:
- ipaserver_test_base.yml
# - ipaserver_ca_dns_kra_ad.yml
# - ipaserver_ipaclient_ca.yml
# - ipaserver_ca_dns_nokra_noad.yml
# - ipaserver_ipaclient_ca_only.yml
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1

- name: Build and install collection
run: |
utils/build-galaxy-release.sh -i \
utils/build-galaxy-release.sh -k \
-o "$(curl -L https://api.github.com/repos/freeipa/ansible-freeipa/releases 2>/dev/null \
| jq '.[0].tag_name' | tr -d '"v')-dev$(date +"%Y%m%d%H%M")"
- name: Test ipaserver
uses: rjeffman/FreeIPA-Cluster-Test@devel
uses: rjeffman/FreeIPA-Cluster-Test@v1.0.0
with:
cluster_configuration: tests/deployment/${{ matrix.cluster_config }}
# ansible_vars: test/deployment/ipaserver-vars.yml
Expand All @@ -70,29 +73,70 @@ jobs:
${{ env.test_path }}/tests/host/test_host.yml
${{ env.test_path }}/tests/hbacrule/test_hbacrule.yml
# test_ipareplica:
# name: Test ipareplica role
# needs: [check_roles]
# if: ${{ needs.check_roles.outputs.ipareplica }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # The ipaserver configuration is always "ca-dns-kra-ad"
# cluster_config:
# - ipareplica_none.yml
# - ipareplica_ca.yml
# steps:
#
# test_ipaclientt:
# name: Test ipareplica role
# needs: [check_roles]
# if: ${{ needs.check_roles.outputs.ipareplica }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# # The ipaserver configuration is always "ca-dns-kra-ad"
# cluster_config:
# - ipareplica_none.yml
# - ipareplica_ca.yml
# - ipareplica_copy.yml
# steps:
test_ipareplica:
name: Test ipareplica role
needs: [check_roles]
if: ${{ needs.check_roles.outputs.ipareplica }}
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- fedora-latest
- c10s
# The ipaserver capabilities are "ca-dns-kra"
cluster_config:
- ipareplica_ca.yml
# - ipareplica_none.yml
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1

- name: Build and install collection
run: |
utils/build-galaxy-release.sh -k \
-o "$(curl -L https://api.github.com/repos/freeipa/ansible-freeipa/releases 2>/dev/null \
| jq '.[0].tag_name' | tr -d '"v')-dev$(date +"%Y%m%d%H%M")"
- name: Test ipareplica
uses: rjeffman/[email protected]
with:
cluster_configuration: tests/deployment/${{ matrix.cluster_config }}
ansible_vars: test/deployment/ipareplica-vars.yml
test_playbooks: >-
${{ env.test_path }}/tests/user/test_user.yml
${{ env.test_path }}/tests/group/test_group.yml
${{ env.test_path }}/tests/host/test_host.yml
${{ env.test_path }}/tests/hbacrule/test_hbacrule.yml
test_ipaclientt:
name: Test ipareplica role
needs: [check_roles]
if: ${{ needs.check_roles.outputs.ipaclient }}
runs-on: ubuntu-latest
strategy:
matrix:
# The ipaserver capabilities are "ca-dns-kra"
cluster_config:
- ipaserver_1_client.yml
steps:
- uses: actions/[email protected]
with:
fetch-depth: 1

- name: Build and install collection
run: |
utils/build-galaxy-release.sh -k \
-o "$(curl -L https://api.github.com/repos/freeipa/ansible-freeipa/releases 2>/dev/null \
| jq '.[0].tag_name' | tr -d '"v')-dev$(date +"%Y%m%d%H%M")"
- name: Test ipaclient
uses: rjeffman/[email protected]
with:
cluster_configuration: tests/deployment/${{ matrix.cluster_config }}
# ansible_vars: test/deployment/ipaclient-vars.yml
test_playbooks: >-
${{ env.test_path }}/tests/user/test_user_client_context.yml
${{ env.test_path }}/tests/group/test_group_client_context.yml
${{ env.test_path }}/tests/host/test_host_client_context.yml
${{ env.test_path }}/tests/hbacrule/test_hbacrule_client_context.yml
2 changes: 2 additions & 0 deletions tests/deployment/ipareplica-vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
ipa_test_host: ipareplicas
12 changes: 12 additions & 0 deletions tests/deployment/ipareplica_ca.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lab_name: ipareplica_ca
ipa_deployments:
- name: ipareplica_ca
domain: ipa.test
admin_password: SomeADMINpassword
dm_password: SomeDMpassword
cluster:
servers:
- name: server
capabilities: ["CA", "DNS", "KRA"]
- name: replica
capabilities: ["CA"]
12 changes: 12 additions & 0 deletions tests/deployment/ipaserver_1_client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lab_name: ipaserver_1_client
ipa_deployments:
- name: ipaserver_1_client
domain: ipa.test
admin_password: SomeADMINpassword
dm_password: SomeDMpassword
cluster:
servers:
- name: server
capabilities: ["CA", "DNS", "KRA"]
clients:
- name: cli-01
10 changes: 0 additions & 10 deletions tests/deployment/ipaserver_ca.yml

This file was deleted.

5 changes: 2 additions & 3 deletions tests/deployment/ipaserver_test_base.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
lab_name: ipaserver_ca
lab_name: ipaserver_test_base
ipa_deployments:
- name: ipaserver_with_ca
- name: ipaserver_test_base
domain: ipa.test
admin_password: SomeADMINpassword
dm_password: SomeDMpassword
distro: fedora-latest
cluster:
servers:
- name: server
Expand Down

0 comments on commit 4cbdf4f

Please sign in to comment.