Skip to content

Improve tests that use mock/certs.go #950

@jackwotherspoon

Description

@jackwotherspoon

We should improve tests that use internal/mock/certs.go

Instead of panic'ing which we currently do it would be better if we were to pass the *testing.T parameter through and fail the test.

certDerBytes, err := x509.CreateCertificate(rand.Reader, cert, cert, &k.PublicKey, k)
if err != nil {
panic(err)
}
c, err := x509.ParseCertificate(certDerBytes)
if err != nil {
panic(err)
}
return c

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions