fix wrong usage of strings.TrimLeft

This commit is contained in:
Guoliang Wang 2018-09-06 19:39:04 +08:00
parent 416f63c050
commit bcc1dd8627

View File

@ -458,7 +458,7 @@ var _ = SIGDescribe("Kubectl client", func() {
} }
// Verify the proxy server logs saw the connection // 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() proxyLog := proxyLogs.String()
if !strings.Contains(proxyLog, expectedProxyLog) { if !strings.Contains(proxyLog, expectedProxyLog) {