From 41eff69fb33162c05e2372ed2a87aea025d89f66 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Mon, 1 Feb 2021 14:22:53 -0800 Subject: [PATCH] Fix linting errors. --- kms/pkcs11/other_test.go | 1 + kms/pkcs11/pkcs11_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kms/pkcs11/other_test.go b/kms/pkcs11/other_test.go index 79d734e7..a0d810f4 100644 --- a/kms/pkcs11/other_test.go +++ b/kms/pkcs11/other_test.go @@ -28,6 +28,7 @@ func mustPKCS11(t TBTesting) *PKCS11 { for i := range testCerts { testCerts[i].Certificates = nil } + teardown(t, k) setup(t, k) return k } diff --git a/kms/pkcs11/pkcs11_test.go b/kms/pkcs11/pkcs11_test.go index 029beb66..ebecb7d0 100644 --- a/kms/pkcs11/pkcs11_test.go +++ b/kms/pkcs11/pkcs11_test.go @@ -33,7 +33,7 @@ func TestNew(t *testing.T) { k.Close() }) p11Configure = func(config *crypto11.Config) (P11, error) { - if strings.Index(config.Path, "fail") >= 0 { + if strings.Contains(config.Path, "fail") { return nil, errors.New("an error") } return k.p11, nil