From 908fb0266de84836f4bbb6ea82aa1bc0fc9a1ff2 Mon Sep 17 00:00:00 2001 From: Gavin Lam Date: Thu, 24 Jul 2025 23:23:43 -0400 Subject: [PATCH] Fix gocritic issues Signed-off-by: Gavin Lam --- test/e2e_node/device_plugin_test.go | 2 +- test/e2e_node/remote/gce/gce_runner.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index 7fe48fd8e7a..9ec4e4a378d 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -93,7 +93,7 @@ const ( ) func testDevicePlugin(f *framework.Framework, pluginSockDir string) { - pluginSockDir = filepath.Join(pluginSockDir) + "/" + pluginSockDir = filepath.Clean(pluginSockDir) + "/" type ResourceValue struct { Allocatable int diff --git a/test/e2e_node/remote/gce/gce_runner.go b/test/e2e_node/remote/gce/gce_runner.go index 97476fea978..f746758c9ec 100644 --- a/test/e2e_node/remote/gce/gce_runner.go +++ b/test/e2e_node/remote/gce/gce_runner.go @@ -583,7 +583,7 @@ func (g *GCERunner) createGCEInstance(imageConfig *internalGCEImage) (string, er if err != nil { continue } - if strings.ToUpper(instance.Status) != "RUNNING" { + if !strings.EqualFold(instance.Status, "RUNNING") { _ = fmt.Errorf("instance %s not in state RUNNING, was %s", name, instance.Status) continue } @@ -669,7 +669,7 @@ func (g *GCERunner) registerGceHostIP(host string) error { if err != nil { return err } - if strings.ToUpper(instance.Status) != "RUNNING" { + if !strings.EqualFold(instance.Status, "RUNNING") { return fmt.Errorf("instance %s not in state RUNNING, was %s", host, instance.Status) } externalIP := g.getExternalIP(instance)