Mariano Cano 5 лет назад
Родитель
Сommit
41eff69fb3
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      kms/pkcs11/other_test.go
  2. 1 1
      kms/pkcs11/pkcs11_test.go

+ 1 - 0
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
 }

+ 1 - 1
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