@@ -607,19 +607,19 @@ func AssertCleanup(ns string, selectors ...string) {
607
607
// executed in a specific pod container.
608
608
// TODO(alejandrox1): move to pod/ subpkg once kubectl methods are refactored.
609
609
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 {
611
611
// use the first container
612
612
args := []string {"exec" , podName , fmt .Sprintf ("--namespace=%v" , ns ), "--" }
613
613
args = append (args , command ... )
614
614
return RunKubectlOrDie (ns , args ... )
615
615
})
616
616
}
617
617
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
619
619
// the timeout is reached or the string is found. Returns last log and possibly
620
620
// error if the string was not found.
621
621
// 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 ) {
623
623
for t := time .Now (); time .Since (t ) < timeout ; time .Sleep (Poll ) {
624
624
result = fn ()
625
625
if strings .Contains (result , expectedString ) {
@@ -1570,7 +1570,7 @@ func OpenWebSocketForURL(url *url.URL, config *restclient.Config, protocols []st
1570
1570
1571
1571
// LookForStringInLog looks for the given string in the log of a specific pod container
1572
1572
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 {
1574
1574
return RunKubectlOrDie (ns , "logs" , podName , container , fmt .Sprintf ("--namespace=%v" , ns ))
1575
1575
})
1576
1576
}
0 commit comments