File 0002-Update-tls-error-string-in-migration-test.patch of Package kubevirt
From 0a1bdcce3bfcc9531f515d0b4be31af091e149bc Mon Sep 17 00:00:00 2001
From: Brian Carey <bcarey@redhat.com>
Date: Thu, 21 Dec 2023 15:55:48 +0000
Subject: [PATCH] Update tls error string in migration test
The compute-migrations test lane was failing[1] due to a mismatch in TLS
error strings
TLS error handling was improved in go 1.21[2]
[1] https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/10914/pull-kubevirt-e2e-k8s-1.28-sig-compute-migrations/1737851138511736832
[2] https://github.com/golang/go/commit/62a994837a57a7d0c58bb364b580a389488446c9
Signed-off-by: Brian Carey <bcarey@redhat.com>
---
tests/migration/migration.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/migration/migration.go b/tests/migration/migration.go
index e6eb0a1aa..c4abfdc1c 100644
--- a/tests/migration/migration.go
+++ b/tests/migration/migration.go
@@ -1615,10 +1615,10 @@ var _ = SIGMigrationDescribe("VM Live Migration", func() {
By("checking that we were never able to connect")
tlsErrorFound := false
for err := range errors {
- if strings.Contains(err.Error(), "remote error: tls: bad certificate") {
+ if strings.Contains(err.Error(), "remote error: tls:") {
tlsErrorFound = true
}
- Expect(err.Error()).To(Or(ContainSubstring("remote error: tls: bad certificate"), ContainSubstring("EOF")))
+ Expect(err.Error()).To(Or(ContainSubstring("remote error: tls: unknown certificate authority"), Or(ContainSubstring("remote error: tls: bad certificate")), ContainSubstring("EOF")))
}
Expect(tlsErrorFound).To(BeTrue())
--
2.44.0