Skip to content

Commit 3b3c8df

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

7 files changed

+204
-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 primary 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

+67-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,12 @@ 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 ls -R /var/log
627+
docker exec primary cat /var/log/ipaserver-install.log
628+
625629
- name: Check HTTPD access logs in primary container
626630
if: always()
627631
run: |
@@ -652,6 +656,16 @@ jobs:
652656
run: |
653657
docker exec primary cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
654658
659+
- name: Check CA pkispawn log in primary container
660+
if: always()
661+
run: |
662+
docker exec primary find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
663+
664+
- name: Check KRA pkispawn log in primary container
665+
if: always()
666+
run: |
667+
docker exec primary find /var/log/pki -name "pki-kra-spawn.*" -exec cat {} \;
668+
655669
- name: Check PKI server systemd journal in primary container
656670
if: always()
657671
run: |
@@ -667,19 +681,21 @@ jobs:
667681
run: |
668682
docker exec primary find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
669683
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-
678684
- name: Remove IPA server from primary container
679685
run: |
680686
docker exec secondary ipa server-del primary.example.com
681687
docker exec primary ipa-server-install --uninstall -U
682688
689+
- name: Check CA pkidestroy log in primary container
690+
if: always()
691+
run: |
692+
docker exec primary find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;
693+
694+
- name: Check KRA pkidestroy log in primary container
695+
if: always()
696+
run: |
697+
docker exec primary find /var/log/pki -name "pki-kra-destroy.*" -exec cat {} \;
698+
683699
- name: Check IPA config after removing primary server
684700
run: |
685701
docker exec secondary ipa config-show | tee output
@@ -722,6 +738,16 @@ jobs:
722738
docker exec secondary pki-server ca-config-show ca.connector.KRA.host | tee actual
723739
diff expected actual || true
724740
741+
- name: Check IPA CA install log in secondary container
742+
if: always()
743+
run: |
744+
docker exec secondary cat /var/log/ipareplica-ca-install.log
745+
746+
- name: Check IPA KRA install log in secondary container
747+
if: always()
748+
run: |
749+
docker exec secondary cat /var/log/ipaserver-kra-install.log
750+
725751
- name: Check HTTPD access logs in secondary container
726752
if: always()
727753
run: |
@@ -752,6 +778,16 @@ jobs:
752778
run: |
753779
docker exec secondary cat /var/log/dirsrv/slapd-EXAMPLE-COM/security
754780
781+
- name: Check CA pkispawn log in secondary container
782+
if: always()
783+
run: |
784+
docker exec secondary find /var/log/pki -name "pki-ca-spawn.*" -exec cat {} \;
785+
786+
- name: Check KRA pkispawn log in secondary container
787+
if: always()
788+
run: |
789+
docker exec secondary find /var/log/pki -name "pki-kra-spawn.*" -exec cat {} \;
790+
755791
- name: Check PKI server systemd journal in secondary container
756792
if: always()
757793
run: |
@@ -767,20 +803,16 @@ jobs:
767803
run: |
768804
docker exec secondary find /var/lib/pki/pki-tomcat/logs/ca -name "debug.*" -exec cat {} \;
769805
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-
778806
- name: Remove IPA server from secondary container
779807
run: docker exec secondary ipa-server-install --uninstall -U --ignore-last-of-role
780808

781-
- name: Upload artifacts
809+
- name: Check CA pkidestroy log in secondary container
782810
if: always()
783-
uses: actions/upload-artifact@v4
784-
with:
785-
name: ipa-clone-test
786-
path: /tmp/artifacts
811+
run: |
812+
docker exec secondary ls -R /var/log
813+
docker exec secondary find /var/log/pki -name "pki-ca-destroy.*" -exec cat {} \;
814+
815+
- name: Check KRA pkidestroy log in secondary container
816+
if: always()
817+
run: |
818+
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)