Skip to content

Commit

Permalink
Update CA tests to capture pkidestroy logs
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Feb 29, 2024
1 parent 8686e90 commit ddc3551
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 57 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ca-admin-user-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ jobs:
run: |
docker exec pki pki -n caadmin ca-user-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -234,9 +237,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-basic-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ jobs:
docker exec pki pki --debug -n caadmin ca-profile-add ${SHARED}/profile.xml
docker exec pki pki -n caadmin ca-profile-show caCustomUser
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -231,9 +234,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-cmc-shared-token-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ jobs:
cat output | wc -l > actual
diff expected actual
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -399,9 +402,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ca-ds-connection-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ jobs:
echo "0" > expected
diff expected actual
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-ecc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -269,9 +272,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-existing-certs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -382,9 +385,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-existing-ds-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ jobs:
docker exec pki pki securitydomain-show | tee output
diff expected output
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -437,9 +440,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ca-existing-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Remove SoftHSM token
run: |
docker exec pki runuser -u pkiuser -- softhsm2-util --delete-token --token HSM
- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -435,13 +442,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Remove SoftHSM token
run: |
docker exec pki runuser -u pkiuser -- softhsm2-util --delete-token --token HSM
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-existing-nssdb-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -326,9 +329,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ca-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ jobs:
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Remove SoftHSM token
run: |
docker exec pki ls -laR /var/lib/softhsm/tokens
docker exec pki runuser -u pkiuser -- softhsm2-util --delete-token --token HSM
- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -234,14 +242,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Remove SoftHSM token
run: |
docker exec pki ls -laR /var/lib/softhsm/tokens
docker exec pki runuser -u pkiuser -- softhsm2-util --delete-token --token HSM
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-non-default-user-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ jobs:
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -107,9 +110,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-nuxwdog-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ jobs:
docker exec pki pki info
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -166,9 +169,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-pruning-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ jobs:
echo "RequestNotFoundException: Request ID $REQUEST_ID not found" > expected
diff expected stderr
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -442,9 +445,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-rsa-pss-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -278,9 +281,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-rsa-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -277,9 +280,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-rsnv1-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ jobs:
run: |
docker exec pki pki ca-cert-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -145,9 +148,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ca-sequential-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ jobs:
run: |
docker exec pki pki ca-cert-find
- name: Remove CA
run: docker exec pki pkidestroy -i pki-tomcat -s CA -v

- name: Check PKI server systemd journal
if: always()
run: |
Expand All @@ -136,9 +139,6 @@ jobs:
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

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

- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit ddc3551

Please sign in to comment.