Skip to content

Commit

Permalink
adjust cert registry tests for expanded registry entry type
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhlx committed Nov 8, 2024
1 parent b30d93f commit 35391e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions secrets/certregistry/certregistry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ func TestCertRegistry(t *testing.T) {
t.Run("sync new certificate", func(t *testing.T) {
cr := NewCertRegistry()
cr.ConfigureCertificate(validHostname, validCert)
cert, found := cr.lookup[validHostname]
entry, found := cr.lookup[validHostname]
if !found {
t.Error("failed to read certificate")
}
if cert.Leaf == nil {
if entry.Certificate.Leaf == nil {
t.Error("synced cert should have a parsed leaf")
}
})
Expand All @@ -178,10 +178,10 @@ func TestCertRegistry(t *testing.T) {

cr := NewCertRegistry()
cr.ConfigureCertificate(validHostname, validCert)
cert1 := cr.lookup[validHostname]
entry1 := cr.lookup[validHostname]
cr.ConfigureCertificate(validHostname, newValidCert)
cert2 := cr.lookup[validHostname]
if equalCert(cert1, cert2) {
entry2 := cr.lookup[validHostname]
if equalCert(entry1.Certificate, entry2.Certificate) {
t.Error("host cert was not updated")
}

Expand Down

0 comments on commit 35391e6

Please sign in to comment.