Skip to content

Commit

Permalink
Update PKI tests to check systemd journals and debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed May 10, 2024
1 parent ea79332 commit a1533e4
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 17 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/pki-ca-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,37 @@ jobs:
docker exec pki /usr/share/pki/tests/ca/bin/test-ca-auditor-cert.sh
docker exec pki /usr/share/pki/tests/ca/bin/test-ca-auditor-logs.sh
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh pki
tests/bin/pki-artifacts-save.sh pki
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Remove DS
run: docker exec pki ${SHARED}/tests/bin/ds-remove.sh

- name: Check DS server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u [email protected]
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u [email protected]
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh pki
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: pki-ca-test
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
42 changes: 33 additions & 9 deletions .github/workflows/pki-tps-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ jobs:
docker exec pki pki -n caadmin tps-cert-find --token $CUID
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

- name: Remove TPS
run: docker exec pki pkidestroy -i pki-tomcat -s TPS -v

Expand All @@ -165,10 +158,41 @@ jobs:
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check DS server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u [email protected]
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u [email protected]
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
- name: Check TKS debug log
if: always()
run: |
docker exec pki find /var/lib/pki/pki-tomcat/logs/tks -name "debug.*" -exec cat {} \;
- name: Check TPS debug log
if: always()
run: |
docker exec pki find /var/lib/pki/pki-tomcat/logs/tps -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh pki
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: pki-tps-test
path: |
/tmp/artifacts/pki
path: /tmp/artifacts

0 comments on commit a1533e4

Please sign in to comment.