Skip to content

Commit 15bc887

Browse files
committed
test/e2e/framework/util.go:make function LookForString private
1 parent 8ca96f3 commit 15bc887

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/framework/util.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,19 +607,19 @@ func AssertCleanup(ns string, selectors ...string) {
607607
// executed in a specific pod container.
608608
// TODO(alejandrox1): move to pod/ subpkg once kubectl methods are refactored.
609609
func LookForStringInPodExec(ns, podName string, command []string, expectedString string, timeout time.Duration) (result string, err error) {
610-
return LookForString(expectedString, timeout, func() string {
610+
return lookForString(expectedString, timeout, func() string {
611611
// use the first container
612612
args := []string{"exec", podName, fmt.Sprintf("--namespace=%v", ns), "--"}
613613
args = append(args, command...)
614614
return RunKubectlOrDie(ns, args...)
615615
})
616616
}
617617

618-
// LookForString looks for the given string in the output of fn, repeatedly calling fn until
618+
// lookForString looks for the given string in the output of fn, repeatedly calling fn until
619619
// the timeout is reached or the string is found. Returns last log and possibly
620620
// error if the string was not found.
621621
// TODO(alejandrox1): move to pod/ subpkg once kubectl methods are refactored.
622-
func LookForString(expectedString string, timeout time.Duration, fn func() string) (result string, err error) {
622+
func lookForString(expectedString string, timeout time.Duration, fn func() string) (result string, err error) {
623623
for t := time.Now(); time.Since(t) < timeout; time.Sleep(Poll) {
624624
result = fn()
625625
if strings.Contains(result, expectedString) {
@@ -1570,7 +1570,7 @@ func OpenWebSocketForURL(url *url.URL, config *restclient.Config, protocols []st
15701570

15711571
// LookForStringInLog looks for the given string in the log of a specific pod container
15721572
func LookForStringInLog(ns, podName, container, expectedString string, timeout time.Duration) (result string, err error) {
1573-
return LookForString(expectedString, timeout, func() string {
1573+
return lookForString(expectedString, timeout, func() string {
15741574
return RunKubectlOrDie(ns, "logs", podName, container, fmt.Sprintf("--namespace=%v", ns))
15751575
})
15761576
}

0 commit comments

Comments
 (0)