From 640dce3705c450e2baf268e0726722e24a4b9827 Mon Sep 17 00:00:00 2001 From: Matthew Sykes Date: Fri, 22 May 2020 21:25:42 -0400 Subject: [PATCH] Add error checks to cryptogen/ca/ca_test Signed-off-by: Matthew Sykes --- internal/cryptogen/ca/ca_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/cryptogen/ca/ca_test.go b/internal/cryptogen/ca/ca_test.go index 6bfd5340cdc..65e56cd7ec0 100644 --- a/internal/cryptogen/ca/ca_test.go +++ b/internal/cryptogen/ca/ca_test.go @@ -224,6 +224,7 @@ func TestGenerateSignCertificate(t *testing.T) { ous := []string{"TestOU", "PeerOU"} cert, err = rootCA.SignCertificate(certDir, testName, ous, nil, &priv.PublicKey, x509.KeyUsageDigitalSignature, []x509.ExtKeyUsage{}) + assert.NoError(t, err) assert.Contains(t, cert.Subject.OrganizationalUnit, ous[0]) assert.Contains(t, cert.Subject.OrganizationalUnit, ous[1]) @@ -231,6 +232,7 @@ func TestGenerateSignCertificate(t *testing.T) { sans := []string{testName2, testIP} cert, err = rootCA.SignCertificate(certDir, testName, nil, sans, &priv.PublicKey, x509.KeyUsageDigitalSignature, []x509.ExtKeyUsage{}) + assert.NoError(t, err) assert.Contains(t, cert.DNSNames, testName2) assert.Contains(t, cert.IPAddresses, net.ParseIP(testIP).To4())