From bcc1dd8627ab12bc6e7b9c93b888f8730a572e12 Mon Sep 17 00:00:00 2001 From: Guoliang Wang Date: Thu, 6 Sep 2018 19:39:04 +0800 Subject: [PATCH] fix wrong usage of strings.TrimLeft --- test/e2e/kubectl/kubectl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/kubectl/kubectl.go b/test/e2e/kubectl/kubectl.go index 25f44a0fd1e..08210cb81f9 100644 --- a/test/e2e/kubectl/kubectl.go +++ b/test/e2e/kubectl/kubectl.go @@ -458,7 +458,7 @@ var _ = SIGDescribe("Kubectl client", func() { } // Verify the proxy server logs saw the connection - expectedProxyLog := fmt.Sprintf("Accepting CONNECT to %s", strings.TrimRight(strings.TrimLeft(framework.TestContext.Host, "https://"), "/api")) + expectedProxyLog := fmt.Sprintf("Accepting CONNECT to %s", strings.TrimSuffix(strings.TrimPrefix(framework.TestContext.Host, "https://"), "/api")) proxyLog := proxyLogs.String() if !strings.Contains(proxyLog, expectedProxyLog) {