From 1bba4075fc5bf232af811e22acfeee9f51f553e2 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Jun 24 2020 22:05:23 +0000 Subject: tests: Parametrize 025-casave with NSS db types This test fails against NSS having disabled DBM. Fixes: https://pagure.io/certmonger/issue/155 Signed-off-by: Stanislav Levin --- diff --git a/tests/025-casave-dbm/expected.out b/tests/025-casave-dbm/expected.out new file mode 100644 index 0000000..aadb198 --- /dev/null +++ b/tests/025-casave-dbm/expected.out @@ -0,0 +1,381 @@ +[(CAB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Root Certificate D1 CT,C,C + +[(CAD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(CAD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Root Certificate D3 CT,C,C + +[(EntryB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Per-certificate Signing Authority D1 CT,C,C +[db2] +[db3] +[dba] +Per-certificate Signing Authority D1 CT,C,C + +[(EntryD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +[dba] + +[(EntryD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Per-certificate Signing Authority D3 ,, +[dba] +Per-certificate Signing Authority D3 ,, + +[(EntryCB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Per-certificate Signing Authority CD1 CT,C,C +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Per-certificate Signing Authority CD1 CT,C,C +Root Certificate D1 CT,C,C + +[(EntryCD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(EntryCD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +Per-certificate Signing Authority CD3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Per-certificate Signing Authority CD3 ,, +Root Certificate D3 CT,C,C + +[(EntryCAB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Root Certificate D1 CT,C,C + +[(EntryCAD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(EntryCAD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Root Certificate D3 CT,C,C + +OK. diff --git a/tests/025-casave-dbm/run.sh b/tests/025-casave-dbm/run.sh new file mode 100755 index 0000000..c5d7220 --- /dev/null +++ b/tests/025-casave-dbm/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +exec env scheme=dbm ../025-casave/run.sh diff --git a/tests/025-casave-sql/expected.out b/tests/025-casave-sql/expected.out new file mode 100644 index 0000000..aadb198 --- /dev/null +++ b/tests/025-casave-sql/expected.out @@ -0,0 +1,381 @@ +[(CAB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(CAD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Root Certificate D1 CT,C,C + +[(CAD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(CAD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Root Certificate D3 CT,C,C + +[(EntryB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Per-certificate Signing Authority D1 CT,C,C +[db2] +[db3] +[dba] +Per-certificate Signing Authority D1 CT,C,C + +[(EntryD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +[dba] + +[(EntryD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Per-certificate Signing Authority D3 ,, +[dba] +Per-certificate Signing Authority D3 ,, + +[(EntryCB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Per-certificate Signing Authority CD1 CT,C,C +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Per-certificate Signing Authority CD1 CT,C,C +Root Certificate D1 CT,C,C + +[(EntryCD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(EntryCD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +Per-certificate Signing Authority CD3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Per-certificate Signing Authority CD3 ,, +Root Certificate D3 CT,C,C + +[(EntryCAB1)] +[bundle1] +2 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAB2)] +[bundle1] +0 +[bundle2] +1 +[bundle3] +0 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAB3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +2 +[bundle-all] +6 +[db1] +[db2] +[db3] +[dba] + +[(EntryCAD1)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +Root Certificate D1 CT,C,C +[db2] +[db3] +[dba] +Other Certificate D1 ,, +Other Root Certificate D1 CT,C,C +Root Certificate D1 CT,C,C + +[(EntryCAD2)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +Other Root Certificate D2 CT,C,C +[db3] +[dba] +Other Certificate D2 ,, +Other Root Certificate D2 CT,C,C +Root Certificate D2 CT,C,C + +[(EntryCAD3)] +[bundle1] +0 +[bundle2] +0 +[bundle3] +0 +[bundle-all] +0 +[db1] +[db2] +[db3] +Other Certificate D3 ,, +[dba] +Other Certificate D3 ,, +Other Root Certificate D3 CT,C,C +Root Certificate D3 CT,C,C + +OK. diff --git a/tests/025-casave-sql/run.sh b/tests/025-casave-sql/run.sh new file mode 100755 index 0000000..f675535 --- /dev/null +++ b/tests/025-casave-sql/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +exec env scheme=sql ../025-casave/run.sh diff --git a/tests/025-casave/run.sh b/tests/025-casave/run.sh index aff1e6d..60f92d0 100755 --- a/tests/025-casave/run.sh +++ b/tests/025-casave/run.sh @@ -2,6 +2,7 @@ cd $tmpdir +scheme="${scheme:-dbm}" cat > $tmpdir/entrycb1 <<- EOF id=EntryCB1 ca_name=CAB1 @@ -196,7 +197,7 @@ id=EntryD1 root_cert_files= other_root_cert_files= other_cert_files= -root_cert_dbs=dbm:$tmpdir/db1,dbm:$tmpdir/dba +root_cert_dbs=$scheme:$tmpdir/db1,$scheme:$tmpdir/dba other_root_cert_dbs= other_cert_dbs= cert_roots=Per-certificate Signing Authority D1 @@ -229,7 +230,7 @@ root_cert_files= other_root_cert_files= other_cert_files= root_cert_dbs= -other_root_cert_dbs=dbm:$tmpdir/db2,dbm:$tmpdir/dba +other_root_cert_dbs=$scheme:$tmpdir/db2,$scheme:$tmpdir/dba other_cert_dbs= EOF cat > $tmpdir/entryd3 <<- EOF @@ -239,7 +240,7 @@ other_root_cert_files= other_cert_files= root_cert_dbs= other_root_cert_dbs= -other_cert_dbs=dbm:$tmpdir/db3,dbm:$tmpdir/dba +other_cert_dbs=$scheme:$tmpdir/db3,$scheme:$tmpdir/dba cert_chain=Per-certificate Signing Authority D3 -----BEGIN CERTIFICATE----- MIIDjjCCAnagAwIBAgIRALuVK2FuXklPuMP4qtRyQjUwDQYJKoZIhvcNAQELBQAw @@ -300,7 +301,7 @@ ca_name=CAD1 root_cert_files= other_root_cert_files= other_cert_files= -root_cert_dbs=dbm:$tmpdir/db1,dbm:$tmpdir/dba +root_cert_dbs=$scheme:$tmpdir/db1,$scheme:$tmpdir/dba other_root_cert_dbs= other_cert_dbs= EOF @@ -311,7 +312,7 @@ root_cert_files= other_root_cert_files= other_cert_files= root_cert_dbs= -other_root_cert_dbs=dbm:$tmpdir/db2,dbm:$tmpdir/dba +other_root_cert_dbs=$scheme:$tmpdir/db2,$scheme:$tmpdir/dba other_cert_dbs= EOF cat > $tmpdir/entrycad3 <<- EOF @@ -322,7 +323,7 @@ other_root_cert_files= other_cert_files= root_cert_dbs= other_root_cert_dbs= -other_cert_dbs=dbm:$tmpdir/db3,dbm:$tmpdir/dba +other_cert_dbs=$scheme:$tmpdir/db3,$scheme:$tmpdir/dba EOF cat > $tmpdir/cab1 <<- EOF @@ -564,9 +565,9 @@ ca_external_helper=$tmpdir/no-such-helper.sh ca_root_cert_files= ca_other_root_cert_files= ca_other_cert_files= -ca_root_cert_dbs=dbm:$tmpdir/db1,dbm:$tmpdir/dba -ca_other_root_cert_dbs=dbm:$tmpdir/dba -ca_other_cert_dbs=dbm:$tmpdir/dba +ca_root_cert_dbs=$scheme:$tmpdir/db1,$scheme:$tmpdir/dba +ca_other_root_cert_dbs=$scheme:$tmpdir/dba +ca_other_cert_dbs=$scheme:$tmpdir/dba ca_root_certs=Root Certificate D1 -----BEGIN CERTIFICATE----- MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ @@ -639,9 +640,9 @@ ca_external_helper=$tmpdir/no-such-helper.sh ca_root_cert_files= ca_other_root_cert_files= ca_other_cert_files= -ca_root_cert_dbs=dbm:$tmpdir/dba -ca_other_root_cert_dbs=dbm:$tmpdir/db2,dbm:$tmpdir/dba -ca_other_cert_dbs=dbm:$tmpdir/dba +ca_root_cert_dbs=$scheme:$tmpdir/dba +ca_other_root_cert_dbs=$scheme:$tmpdir/db2,$scheme:$tmpdir/dba +ca_other_cert_dbs=$scheme:$tmpdir/dba ca_root_certs=Root Certificate D2 -----BEGIN CERTIFICATE----- MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzET @@ -722,9 +723,9 @@ ca_external_helper=$tmpdir/no-such-helper.sh ca_root_cert_files= ca_other_root_cert_files= ca_other_cert_files= -ca_root_cert_dbs=,dbm:$tmpdir/dba -ca_other_root_cert_dbs=,dbm:$tmpdir/dba, -ca_other_cert_dbs=dbm:$tmpdir/db3,dbm:$tmpdir/dba +ca_root_cert_dbs=,$scheme:$tmpdir/dba +ca_other_root_cert_dbs=,$scheme:$tmpdir/dba, +ca_other_cert_dbs=$scheme:$tmpdir/db3,$scheme:$tmpdir/dba ca_root_certs=Root Certificate D3 -----BEGIN CERTIFICATE----- MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL @@ -796,9 +797,9 @@ ca_external_helper=$tmpdir/no-such-helper.sh ca_root_cert_files=$tmpdir/bundle-all ca_other_root_cert_files= ca_other_cert_files= -ca_root_cert_dbs=dbm:$tmpdir/dba -ca_other_root_cert_dbs=,dbm:$tmpdir/dba -ca_other_cert_dbs=,dbm:$tmpdir/dba +ca_root_cert_dbs=$scheme:$tmpdir/dba +ca_other_root_cert_dbs=,$scheme:$tmpdir/dba +ca_other_cert_dbs=,$scheme:$tmpdir/dba ca_root_certs=Root Certificate DA -----BEGIN CERTIFICATE----- MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL diff --git a/tests/Makefile.am b/tests/Makefile.am index 6e761bd..bbd4049 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -92,6 +92,10 @@ CLEANFILES = \ 024-citerate/actual.err \ 025-casave/actual.out \ 025-casave/actual.err \ + 025-casave-dbm/actual.out \ + 025-casave-dbm/actual.err \ + 025-casave-sql/actual.out \ + 025-casave-sql/actual.err \ 026-local/actual.out \ 026-local/actual.err \ 027-hooks/actual.out \ @@ -263,6 +267,10 @@ EXTRA_DIST = \ 024-citerate/run.sh \ 025-casave/expected.out \ 025-casave/run.sh \ + 025-casave-dbm/expected.out \ + 025-casave-dbm/run.sh \ + 025-casave-sql/expected.out \ + 025-casave-sql/run.sh \ 026-local/expected.out \ 026-local/run.sh \ 027-hooks/expected.out \ @@ -362,7 +370,6 @@ subdirs = \ 022-base64 \ 023-cadata \ 024-citerate \ - 025-casave \ 026-local \ 027-hooks \ 028-dbus \ @@ -386,6 +393,7 @@ subdirs += \ 013-enckey-dbm \ 015-lockedkey-dbm \ 017-notoken-dbm \ + 025-casave-dbm \ 034-perms-dbm endif @@ -398,6 +406,7 @@ subdirs += \ 013-enckey-sql \ 015-lockedkey-sql \ 017-notoken-sql \ + 025-casave-sql \ 034-perms-sql endif