diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 23edde4dcaf..d289f11dcd6 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -607,7 +607,7 @@ func AssertCleanup(ns string, selectors ...string) { // executed in a specific pod container. // TODO(alejandrox1): move to pod/ subpkg once kubectl methods are refactored. func LookForStringInPodExec(ns, podName string, command []string, expectedString string, timeout time.Duration) (result string, err error) { - return LookForString(expectedString, timeout, func() string { + return lookForString(expectedString, timeout, func() string { // use the first container args := []string{"exec", podName, fmt.Sprintf("--namespace=%v", ns), "--"} args = append(args, command...) @@ -615,11 +615,11 @@ func LookForStringInPodExec(ns, podName string, command []string, expectedString }) } -// LookForString looks for the given string in the output of fn, repeatedly calling fn until +// lookForString looks for the given string in the output of fn, repeatedly calling fn until // the timeout is reached or the string is found. Returns last log and possibly // error if the string was not found. // TODO(alejandrox1): move to pod/ subpkg once kubectl methods are refactored. -func LookForString(expectedString string, timeout time.Duration, fn func() string) (result string, err error) { +func lookForString(expectedString string, timeout time.Duration, fn func() string) (result string, err error) { for t := time.Now(); time.Since(t) < timeout; time.Sleep(Poll) { result = fn() if strings.Contains(result, expectedString) { @@ -1570,7 +1570,7 @@ func OpenWebSocketForURL(url *url.URL, config *restclient.Config, protocols []st // LookForStringInLog looks for the given string in the log of a specific pod container func LookForStringInLog(ns, podName, container, expectedString string, timeout time.Duration) (result string, err error) { - return LookForString(expectedString, timeout, func() string { + return lookForString(expectedString, timeout, func() string { return RunKubectlOrDie(ns, "logs", podName, container, fmt.Sprintf("--namespace=%v", ns)) }) }