Skip to content

Commit 427ed3e

Browse files
committed
Update IPA tests to check pkispawn and pkidestroy logs
1 parent 26d5bf7 commit 427ed3e

7 files changed

+207
-121
lines changed

.github/workflows/ipa-acme-test.yml

+21-20
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929

3030
- name: Run IPA container
3131
run: |
32-
tests/bin/runner-init.sh ipa
33-
env:
34-
IMAGE: ipa-runner
35-
HOSTNAME: ipa.example.com
36-
37-
- name: Connect IPA container to network
38-
run: docker network connect example ipa --alias ipa.example.com --alias ipa-ca.example.com
32+
tests/bin/runner-init.sh \
33+
--image=ipa-runner \
34+
--hostname=ipa.example.com \
35+
--network=example \
36+
--network-alias=ipa.example.com \
37+
--network-alias=ipa-ca.example.com \
38+
ipa
3939
4040
- name: Install IPA server in IPA container
4141
run: |
@@ -153,6 +153,12 @@ jobs:
153153
docker exec ipa bash -c "pki acme-info | sed -n 's/\s*Status:\s\+\(\S\+\).*/\1/p' > ${SHARED}/actual"
154154
diff expected actual
155155
156+
- name: Check IPA CA install log
157+
if: always()
158+
run: |
159+
docker exec ipa ls -R /var/log
160+
docker exec ipa cat /var/log/ipaserver-install.log
161+
156162
- name: Check HTTPD access logs
157163
if: always()
158164
run: |
@@ -183,6 +189,11 @@ jobs:
183189
run: |
184190
docker exec ipa cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
185191
192+
- name: Check CA pkispawn log
193+
if: always()
194+
run: |
195+
docker exec ipa find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
196+
186197
- name: Check PKI server systemd journal
187198
if: always()
188199
run: |
@@ -198,20 +209,10 @@ jobs:
198209
run: |
199210
docker exec ipa find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
200211
201-
- name: Gather artifacts
202-
if: always()
203-
run: |
204-
tests/bin/ds-artifacts-save.sh ipa --instance EXAMPLE-COM
205-
tests/bin/pki-artifacts-save.sh ipa
206-
tests/bin/ipa-artifacts-save.sh ipa
207-
continue-on-error: true
208-
209212
- name: Remove IPA server from IPA container
210213
run: docker exec ipa ipa-server-install --uninstall -U
211214

212-
- name: Upload artifacts
215+
- name: Check CA pkidestroy log
213216
if: always()
214-
uses: actions/upload-artifact@v4
215-
with:
216-
name: ipa-acme-test
217-
path: /tmp/artifacts
217+
run: |
218+
docker exec ipa find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;

.github/workflows/ipa-basic-test.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ jobs:
2424
- name: Load IPA images
2525
run: docker load --input ipa-images.tar
2626

27+
- name: Create network
28+
run: docker network create example
29+
2730
- name: Run IPA container
2831
run: |
29-
tests/bin/runner-init.sh ipa
30-
env:
31-
IMAGE: ipa-runner
32-
HOSTNAME: ipa.example.com
32+
tests/bin/runner-init.sh \
33+
--image=ipa-runner \
34+
--hostname=ipa.example.com \
35+
--network=example \
36+
--network-alias=ipa.example.com \
37+
ipa
3338
3439
- name: Install IPA server
3540
run: |
@@ -248,6 +253,11 @@ jobs:
248253
docker exec ipa ipa-run-tests -x --verbose \
249254
test_xmlrpc/test_ca_plugin.py
250255
256+
- name: Check IPA CA install log
257+
if: always()
258+
run: |
259+
docker exec ipa cat /var/log/ipaserver-install.log
260+
251261
- name: Check HTTPD access logs
252262
if: always()
253263
run: |
@@ -278,10 +288,10 @@ jobs:
278288
run: |
279289
docker exec ipa cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
280290
281-
- name: Check IPA CA install log
291+
- name: Check CA pkispawn log
282292
if: always()
283293
run: |
284-
docker exec ipa cat /var/log/ipaserver-install.log
294+
docker exec ipa find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
285295
286296
- name: Check PKI server systemd journal
287297
if: always()
@@ -298,20 +308,10 @@ jobs:
298308
run: |
299309
docker exec ipa find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
300310
301-
- name: Gather artifacts
302-
if: always()
303-
run: |
304-
tests/bin/ds-artifacts-save.sh ipa --instance EXAMPLE-COM
305-
tests/bin/pki-artifacts-save.sh ipa
306-
tests/bin/ipa-artifacts-save.sh ipa
307-
continue-on-error: true
308-
309311
- name: Remove IPA server
310312
run: docker exec ipa ipa-server-install --uninstall -U
311313

312-
- name: Upload artifacts
314+
- name: Check CA pkidestroy log
313315
if: always()
314-
uses: actions/upload-artifact@v4
315-
with:
316-
name: ipa-basic-test
317-
path: /tmp/artifacts
316+
run: |
317+
docker exec ipa find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;

.github/workflows/ipa-clone-test.yml

+70-35
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ jobs:
2929

3030
- name: Run primary container
3131
run: |
32-
tests/bin/runner-init.sh primary
33-
env:
34-
IMAGE: ipa-runner
35-
HOSTNAME: primary.example.com
36-
37-
- name: Connect primary container to network
38-
run: docker network connect example primary --alias primary.example.com
32+
tests/bin/runner-init.sh \
33+
--image=ipa-runner \
34+
--hostname=primary.example.com \
35+
--network=example \
36+
--network-alias=primary.example.com \
37+
primary
3938
4039
- name: Install IPA server in primary container
4140
run: |
@@ -141,13 +140,12 @@ jobs:
141140
142141
- name: Run secondary container
143142
run: |
144-
tests/bin/runner-init.sh secondary
145-
env:
146-
IMAGE: ipa-runner
147-
HOSTNAME: secondary.example.com
148-
149-
- name: Connect secondary container to network
150-
run: docker network connect example secondary --alias secondary.example.com
143+
tests/bin/runner-init.sh \
144+
--image=ipa-runner \
145+
--hostname=secondary.example.com \
146+
--network=example \
147+
--network-alias=secondary.example.com \
148+
secondary
151149
152150
- name: Install IPA client in secondary container
153151
run: |
@@ -622,6 +620,16 @@ jobs:
622620
grep "Number of entries returned" output-primary > actual
623621
diff expected actual
624622
623+
- name: Check IPA CA install log in primary container
624+
if: always()
625+
run: |
626+
docker exec primary cat /var/log/ipaserver-install.log
627+
628+
- name: Check IPA KRA install log in primary container
629+
if: always()
630+
run: |
631+
docker exec primary cat /var/log/ipaserver-kra-install.log
632+
625633
- name: Check HTTPD access logs in primary container
626634
if: always()
627635
run: |
@@ -652,6 +660,16 @@ jobs:
652660
run: |
653661
docker exec primary cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
654662
663+
- name: Check CA pkispawn log in primary container
664+
if: always()
665+
run: |
666+
docker exec primary find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
667+
668+
- name: Check KRA pkispawn log in primary container
669+
if: always()
670+
run: |
671+
docker exec primary find /var/log/pki -name "pki-kra-spawn.*" -exec cat {} \;
672+
655673
- name: Check PKI server systemd journal in primary container
656674
if: always()
657675
run: |
@@ -667,19 +685,21 @@ jobs:
667685
run: |
668686
docker exec primary find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
669687
670-
- name: Gather artifacts from primary container
671-
if: always()
672-
run: |
673-
tests/bin/ds-artifacts-save.sh primary --instance EXAMPLE-COM
674-
tests/bin/pki-artifacts-save.sh primary
675-
tests/bin/ipa-artifacts-save.sh primary
676-
continue-on-error: true
677-
678688
- name: Remove IPA server from primary container
679689
run: |
680690
docker exec secondary ipa server-del primary.example.com
681691
docker exec primary ipa-server-install --uninstall -U
682692
693+
- name: Check CA pkidestroy log in primary container
694+
if: always()
695+
run: |
696+
docker exec primary find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;
697+
698+
- name: Check KRA pkidestroy log in primary container
699+
if: always()
700+
run: |
701+
docker exec primary find /var/log/pki -name "pki-kra-destroy.*" -exec cat {} \;
702+
683703
- name: Check IPA config after removing primary server
684704
run: |
685705
docker exec secondary ipa config-show | tee output
@@ -722,6 +742,16 @@ jobs:
722742
docker exec secondary pki-server ca-config-show ca.connector.KRA.host | tee actual
723743
diff expected actual || true
724744
745+
- name: Check IPA CA install log in secondary container
746+
if: always()
747+
run: |
748+
docker exec secondary cat /var/log/ipareplica-ca-install.log
749+
750+
- name: Check IPA KRA install log in secondary container
751+
if: always()
752+
run: |
753+
docker exec secondary cat /var/log/ipaserver-kra-install.log
754+
725755
- name: Check HTTPD access logs in secondary container
726756
if: always()
727757
run: |
@@ -752,6 +782,16 @@ jobs:
752782
run: |
753783
docker exec secondary cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
754784
785+
- name: Check CA pkispawn log in secondary container
786+
if: always()
787+
run: |
788+
docker exec secondary find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
789+
790+
- name: Check KRA pkispawn log in secondary container
791+
if: always()
792+
run: |
793+
docker exec secondary find /var/log/pki -name "pki-kra-spawn.*" -exec cat {} \;
794+
755795
- name: Check PKI server systemd journal in secondary container
756796
if: always()
757797
run: |
@@ -767,20 +807,15 @@ jobs:
767807
run: |
768808
docker exec secondary find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
769809
770-
- name: Gather artifacts from secondary container
771-
if: always()
772-
run: |
773-
tests/bin/ds-artifacts-save.sh secondary --instance EXAMPLE-COM
774-
tests/bin/pki-artifacts-save.sh secondary
775-
tests/bin/ipa-artifacts-save.sh secondary
776-
continue-on-error: true
777-
778810
- name: Remove IPA server from secondary container
779811
run: docker exec secondary ipa-server-install --uninstall -U --ignore-last-of-role
780812

781-
- name: Upload artifacts
813+
- name: Check CA pkidestroy log in secondary container
782814
if: always()
783-
uses: actions/upload-artifact@v4
784-
with:
785-
name: ipa-clone-test
786-
path: /tmp/artifacts
815+
run: |
816+
docker exec secondary find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;
817+
818+
- name: Check KRA pkidestroy log in secondary container
819+
if: always()
820+
run: |
821+
docker exec secondary find /var/log/pki -name "pki-kra-destroy.*" -exec cat {} \;

.github/workflows/ipa-kra-test.yml

+31-21
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ jobs:
2424
- name: Load IPA images
2525
run: docker load --input ipa-images.tar
2626

27+
- name: Create network
28+
run: docker network create example
29+
2730
- name: Run IPA container
2831
run: |
29-
tests/bin/runner-init.sh ipa
30-
env:
31-
IMAGE: ipa-runner
32-
HOSTNAME: ipa.example.com
32+
tests/bin/runner-init.sh \
33+
--image=ipa-runner \
34+
--hostname=ipa.example.com \
35+
--network=example \
36+
--network-alias=ipa.example.com \
37+
ipa
3338
3439
- name: Install IPA server
3540
run: |
@@ -232,6 +237,16 @@ jobs:
232237
# the original private key should be identical to the archived one
233238
diff private.key output
234239
240+
- name: Check IPA CA install log
241+
if: always()
242+
run: |
243+
docker exec ipa cat /var/log/ipaserver-install.log
244+
245+
- name: Check IPA KRA install log
246+
if: always()
247+
run: |
248+
docker exec ipa cat /var/log/ipaserver-kra-install.log
249+
235250
- name: Check HTTPD access logs
236251
if: always()
237252
run: |
@@ -262,15 +277,15 @@ jobs:
262277
run: |
263278
docker exec ipa cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
264279
265-
- name: Check IPA CA install log
280+
- name: Check CA pkispawn log
266281
if: always()
267282
run: |
268-
docker exec ipa cat /var/log/ipaserver-install.log
283+
docker exec ipa find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
269284
270-
- name: Check IPA KRA install log
285+
- name: Check KRA pkispawn log
271286
if: always()
272287
run: |
273-
docker exec ipa cat /var/log/ipaserver-kra-install.log
288+
docker exec ipa find /var/log/pki -name "pki-kra-spawn.*" -exec cat {} \;
274289
275290
- name: Check PKI server systemd journal
276291
if: always()
@@ -292,20 +307,15 @@ jobs:
292307
run: |
293308
docker exec ipa find /var/lib/pki/pki-tomcat/logs/kra -name "debug.*" -exec cat {} \;
294309
295-
- name: Gather artifacts
296-
if: always()
297-
run: |
298-
tests/bin/ds-artifacts-save.sh ipa --instance EXAMPLE-COM
299-
tests/bin/pki-artifacts-save.sh ipa
300-
tests/bin/ipa-artifacts-save.sh ipa
301-
continue-on-error: true
302-
303310
- name: Remove IPA server
304311
run: docker exec ipa ipa-server-install --uninstall -U
305312

306-
- name: Upload artifacts
313+
- name: Check CA pkidestroy log
307314
if: always()
308-
uses: actions/upload-artifact@v4
309-
with:
310-
name: ipa-kra-test
311-
path: /tmp/artifacts
315+
run: |
316+
docker exec ipa find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;
317+
318+
- name: Check KRA pkidestroy log
319+
if: always()
320+
run: |
321+
docker exec ipa find /var/log/pki -name "pki-kra-destroy.*" -exec cat {} \;

0 commit comments

Comments
 (0)