Skip to content

Commit

Permalink
test: cacert added to all-customization
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Nov 19, 2024
1 parent 080c089 commit 37633c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/osbuild/pki_update_ca_trust_stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ func TestNewCAFileNodes(t *testing.T) {
files, err := NewCAFileNodes(exampleCert)
assert.Nil(t, err)
assert.Equal(t, 2, len(certs), len(files))
expectedPaths := []string{
"/etc/pki/ca-trust/source/anchors/5726bb549dcef16f12ab0b846b4059e074ac5ef0.pem",
"/etc/pki/ca-trust/source/anchors/4550f533dccaa359ad1b20d2ddbd27cd0d0de24.pem",
}
for i, c := range certs {
assert.Equal(t, expectedPaths[i], files[i].Path())
assert.Equal(t, pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: c.Raw}), files[i].Data())
}
}
7 changes: 6 additions & 1 deletion test/configs/all-customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@
"-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQGiBGRBSJURBACzCoe9UNfxOUiFLq9b60weSBFdr39mLViscecDWATNvXtgRoK/\nxl/4qpayzALRCQ2Ek/pMrbKPF/3ngECuBv7S+rI4n/rIia4FNcqzYeZAz4DE4NP/\neUGvz49tWhmH17hX/rmF9kz5kLq2bDZI4GDgZW/oMDdt2ivj092Ljm9jRwCgyQy3\nWEK6RJvIcSEh9vbdwVdMPOcD/iHqNejTMFwGyZfCWB0eIOoxUOUn/ZZpELTL2UpW\nGduCf3txb5SkK7M+WDbb0S5IvNXoi0tc13STiD6Oxg2O9PkSvvYb+8zxlhNoSTwy\n54j7Rf5FlnQ3TAFfjtQ5LCx56LKK73j4RjvKW//ktm5n54exsgo9Ry/e12T46dRg\n7tIlA/91rzLm57Qyc73A7zjgIzef9O6V5ZzowC+pp/jfb5pS9hXgROekLkM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