Skip to content

Commit e133573

Browse files
committed
fix: typos in tests
1 parent a62f1c0 commit e133573

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

internal/certinfo/common_handlers_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func TestCertinfo_GetKeyFromFile_inputReaderErrors(t *testing.T) {
239239
keyPw: samplePrivateKeyPassword,
240240
},
241241
{
242-
desc: "Plain ECSA key import",
242+
desc: "Plain ECDSA key import",
243243
expectError: false,
244244
keyFile: ECDSASamplePlaintextPrivateKey,
245245
},
@@ -251,7 +251,7 @@ func TestCertinfo_GetKeyFromFile_inputReaderErrors(t *testing.T) {
251251
keyPw: samplePrivateKeyPassword,
252252
},
253253
{
254-
desc: "Encrypted broken ECSA key import",
254+
desc: "Encrypted broken ECDSA key import",
255255
expectError: true,
256256
keyFile: ECDSASampleEncBrokenPrivateKey,
257257
expectMsg: "unsupported key format or invalid password",
@@ -400,9 +400,9 @@ func TestCertinfo_getPassphraseIfNeeded(t *testing.T) {
400400
inputReader,
401401
)
402402
require.Error(t, err)
403-
assert.EqualError(t,
403+
require.ErrorContains(t,
404404
err,
405-
"error reading passphrase: inappropriate ioctl for device",
405+
"error reading passphrase:",
406406
)
407407
})
408408

@@ -482,7 +482,7 @@ func TestCertinfo_certMatchPrivateKey_matchFalse(t *testing.T) {
482482
}
483483

484484
func TestCertinfo_certMatchPrivateKey_matchTrue(t *testing.T) {
485-
matchTruetests := []struct {
485+
matchTrueTests := []struct {
486486
desc string
487487
certFile string
488488
keyFile string
@@ -498,7 +498,7 @@ func TestCertinfo_certMatchPrivateKey_matchTrue(t *testing.T) {
498498
keyFile: RSASamplePKCS8PlaintextPrivateKey,
499499
},
500500
{
501-
desc: "ECSA",
501+
desc: "ECDSA",
502502
certFile: ECDSASampleCertificate,
503503
keyFile: ECDSASamplePlaintextPrivateKey,
504504
},
@@ -509,7 +509,7 @@ func TestCertinfo_certMatchPrivateKey_matchTrue(t *testing.T) {
509509
},
510510
}
511511

512-
for _, tt := range matchTruetests {
512+
for _, tt := range matchTrueTests {
513513
t.Run(tt.desc+" match True", func(t *testing.T) {
514514
certs, err := GetCertsFromBundle(
515515
tt.certFile,

0 commit comments

Comments
 (0)