Refactor certauthority_test to not need pool.Subjects()

This commit is contained in:
Joshua Casey
2024-08-19 20:41:49 -05:00
parent c6516af31e
commit 2a6a0d2997

View File

@@ -208,8 +208,10 @@ func TestPool(t *testing.T) {
ca, err := New("test", 1*time.Hour)
require.NoError(t, err)
pool := ca.Pool()
require.Len(t, pool.Subjects(), 1)
expectedPool := x509.NewCertPool()
expectedPool.AppendCertsFromPEM(ca.Bundle())
require.True(t, expectedPool.Equal(ca.Pool()))
}
type errSigner struct {