Merge pull request #68354 from wgliang/fixbug/trim

fix wrong usage of strings.TrimLeft
This commit is contained in:
k8s-ci-robot 2018-09-25 11:04:02 -07:00 committed by GitHub
commit 435bd61145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {