Skip to content

Commit

Permalink
Update IPA tests to display logs
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Feb 28, 2024
1 parent 653c64d commit 8686e90
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 18 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ipa-acme-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ jobs:
docker exec ipa bash -c "pki acme-info | sed -n 's/\s*Status:\s\+\(\S\+\).*/\1/p' > ${SHARED}/actual"
diff expected actual
- name: Check PKI server systemd journal
if: always()
run: |
docker exec ipa journalctl -x --no-pager -u [email protected]
- name: Check CA debug log
if: always()
run: |
docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts from IPA container
if: always()
run: |
Expand All @@ -155,6 +165,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: ipa-acme
path: |
/tmp/artifacts/ipa
name: ipa-acme-test
path: /tmp/artifacts/ipa
10 changes: 10 additions & 0 deletions .github/workflows/ipa-basic-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ jobs:
run: |
docker exec ipa cat /var/log/ipaserver-kra-install.log
- name: Check PKI server systemd journal
if: always()
run: |
docker exec ipa journalctl -x --no-pager -u [email protected]
- name: Check CA debug log
if: always()
run: |
docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/ipa-clone-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,26 @@ jobs:
- name: Remove IPA server from secondary container
run: docker exec secondary ipa-server-install --uninstall -U --ignore-last-of-role

- name: Check PKI server systemd journal in primary container
if: always()
run: |
docker exec primary journalctl -x --no-pager -u [email protected]
- name: Check CA debug log in primary container
if: always()
run: |
docker exec primary find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Check PKI server systemd journal in secondary container
if: always()
run: |
docker exec secondary journalctl -x --no-pager -u [email protected]
- name: Check CA debug log in secondary container
if: always()
run: |
docker exec secondary find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts from primary container
if: always()
run: |
Expand All @@ -640,18 +660,9 @@ jobs:
- name: Remove network
run: docker network rm example

- name: Upload artifacts from primary container
if: always()
uses: actions/upload-artifact@v4
with:
name: ipa-clone-primary
path: |
/tmp/artifacts/primary
- name: Upload artifacts from secondary container
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ipa-clone-secondary
path: |
/tmp/artifacts/secondary
name: ipa-clone-test
path: /tmp/artifacts/secondary
15 changes: 12 additions & 3 deletions .github/workflows/ipa-subca-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ jobs:
--pkcs12-password Secret.123
docker exec ipa pki -n ipa-ca-agent ca-user-show admin
- name: Check PKI server systemd journal
if: always()
run: |
docker exec ipa journalctl -x --no-pager -u [email protected]
- name: Check CA debug log
if: always()
run: |
docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
Expand All @@ -113,6 +123,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: ipa-subca
path: |
/tmp/artifacts/ipa
name: ipa-subca-test
path: /tmp/artifacts

0 comments on commit 8686e90

Please sign in to comment.