From f6150ed992897b1c9d58a5242ddf462f16582d69 Mon Sep 17 00:00:00 2001 From: OpenShift Cherrypick Robot Date: Tue, 7 Jan 2025 19:50:52 +0100 Subject: [PATCH] add case for DNS resolve fail (#2619) (#1018) Signed-off-by: David Fridrich Co-authored-by: David Fridrich <49119790+gauron99@users.noreply.github.com> --- pkg/k8s/dialer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/k8s/dialer_test.go b/pkg/k8s/dialer_test.go index fa7ae92032..7a8a778e2a 100644 --- a/pkg/k8s/dialer_test.go +++ b/pkg/k8s/dialer_test.go @@ -195,7 +195,7 @@ func TestDialUnreachable(t *testing.T) { t.Error("error was expected but got nil") return } - if !strings.Contains(err.Error(), "no such host") { + if !strings.Contains(err.Error(), "no such host") && !strings.Contains(err.Error(), "does not resolve") { t.Errorf("error %q doesn't contain expected substring: ", err.Error()) }