Skip to content

Commit

Permalink
errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 committed Apr 1, 2024
1 parent 5a1b2be commit f36d64a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/certdb/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestCSRValidationSuccess(t *testing.T) {
for i, c := range cases {
t.Run(fmt.Sprintf("ValidCSR%d", i), func(t *testing.T) {
if err := certdb.ValidateCertificateRequest(c); err != nil {
t.Fatalf("Couldn't verify valid CSR: %s", err)
t.Errorf("Couldn't verify valid CSR: %s", err)
}
})
}
Expand Down Expand Up @@ -135,7 +135,7 @@ func TestCSRValidationFail(t *testing.T) {
t.Run(fmt.Sprintf("InvalidCSR%d", i), func(t *testing.T) {
err := certdb.ValidateCertificateRequest(c.input)
if err.Error() != c.expectedErr {
t.Fatalf("Expected error not found:\nReceived: %s\nExpected: %s", err, c.expectedErr)
t.Errorf("Expected error not found:\nReceived: %s\nExpected: %s", err, c.expectedErr)
}
})
}
Expand All @@ -147,7 +147,7 @@ func TestCertValidationSuccess(t *testing.T) {
for i, c := range cases {
t.Run(fmt.Sprintf("ValidCert%d", i), func(t *testing.T) {
if err := certdb.ValidateCertificate(c, ValidCSR2); err != nil {
t.Fatalf("Couldn't verify valid Cert: %s", err)
t.Errorf("Couldn't verify valid Cert: %s", err)
}
})
}
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestCertValidationFail(t *testing.T) {
t.Run(fmt.Sprintf("InvalidCert%d", i), func(t *testing.T) {
err := certdb.ValidateCertificate(c.inputCert, c.inputCSR)
if err.Error() != c.expectedErr {
t.Fatalf("Expected error not found:\nReceived: %s\n Expected: %s", err, c.expectedErr)
t.Errorf("Expected error not found:\nReceived: %s\n Expected: %s", err, c.expectedErr)
}
})
}
Expand Down

0 comments on commit f36d64a

Please sign in to comment.