From 9660e7842d286b0197699ea2446e85a6972b307a Mon Sep 17 00:00:00 2001 From: olcuhu <10589589+olcuhu@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:17:13 +0100 Subject: [PATCH] fixed issue #1295 by making chavacava's suggestion (#1304) * fixed issue 1295 by making chavacava's suggestion & ran tests * removed outer if statement as wasn't checking anything --- cmd/kubernetes_version_test.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmd/kubernetes_version_test.go b/cmd/kubernetes_version_test.go index 6ae0453..9b8bc8d 100644 --- a/cmd/kubernetes_version_test.go +++ b/cmd/kubernetes_version_test.go @@ -264,14 +264,8 @@ func TestGetKubernetesURL(t *testing.T) { } k8sURL := getKubernetesURL() - if !c.useDefault { - if k8sURL != c.expected { - t.Errorf("Expected %q but Got %q", k8sURL, c.expected) - } - } else { - if k8sURL != c.expected { - t.Errorf("Expected %q but Got %q", k8sURL, c.expected) - } + if k8sURL != c.expected { + t.Errorf("Expected %q but Got %q", k8sURL, c.expected) } }) }