From d67a57101bdd49d2e897b1d39ada2a6b8ed7241a Mon Sep 17 00:00:00 2001
From: Ilya Zuyev <izuyev@google.com>
Date: Thu, 14 Jan 2021 15:13:03 -0800
Subject: [PATCH] simplify validateServiceCmd(..) logic

---
 test/integration/functional_test.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go
index f55692eacb..155791e75f 100644
--- a/test/integration/functional_test.go
+++ b/test/integration/functional_test.go
@@ -803,15 +803,15 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
 		}
 	}()
 
-	var echoServerArg string
-	// k8s.gcr.io/echoserver is not multiarch
+	var rr *RunResult
+	var err error
+	// k8s.gcr.io/echoserver is not multi-arch
 	if arm64Platform() {
-		echoServerArg = "k8s.gcr.io/echoserver-arm:1.8"
+		rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=k8s.gcr.io/echoserver-arm:1.8"))
 	} else {
-		echoServerArg = "k8s.gcr.io/echoserver:1.8"
+		rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=k8s.gcr.io/echoserver:1.8"))
 	}
 
-	rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image="+echoServerArg))
 	if err != nil {
 		t.Fatalf("failed to create hello-node deployment with this command %q: %v.", rr.Command(), err)
 	}