From daab24eb2ff04d4b8a6f65e6077dbd3115dc93e8 Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer Date: Fri, 8 Sep 2023 13:26:38 +0200 Subject: [PATCH] Corrected wrong error requirement --- internal/certs/certs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/certs/certs_test.go b/internal/certs/certs_test.go index ed5d639..eb123d1 100644 --- a/internal/certs/certs_test.go +++ b/internal/certs/certs_test.go @@ -17,8 +17,8 @@ func TestLoadCertificates(t *testing.T) { if certificate, err := LoadCertificate(&TestCert, &missingTestkey, nil); certificate != nil || err == nil { t.Errorf("Failure: No Failure while loading certificate using missing key.") } - if certificate, err := LoadCertificate(&TestCert, &Testkey, &Passphrase); certificate == nil || err != nil { - t.Errorf("Failure: Couldn't load supposedly valid certificate with passphrase.") + if certificate, err := LoadCertificate(&TestCert, &Testkey, &Passphrase); certificate != nil || err == nil { + t.Errorf("Failure: Could load unprotected valid certificate with passphrase.") } if certificate, err := LoadCertificate(&TestCert, &missingTestkey, &Passphrase); certificate != nil || err == nil { t.Errorf("Failure: No Failure while loading certificate using missing key with passphrase.")