Remove unused functions in framework.go

This commit is contained in:
Jianfei Bai 2019-10-29 11:44:27 +08:00
parent ba4adeff20
commit 586261291f

View File

@ -22,11 +22,9 @@ limitations under the License.
package framework package framework
import ( import (
"bufio"
"bytes" "bytes"
"fmt" "fmt"
"math/rand" "math/rand"
"os"
"strings" "strings"
"sync" "sync"
"time" "time"
@ -866,18 +864,6 @@ func (cl *ClusterVerification) ForEach(podFunc func(v1.Pod)) error {
return err return err
} }
// GetLogToFileFunc is a convenience function that returns a function that have the same interface as
// e2elog.Logf, but writes to a specified file.
func GetLogToFileFunc(file *os.File) func(format string, args ...interface{}) {
return func(format string, args ...interface{}) {
writer := bufio.NewWriter(file)
if _, err := fmt.Fprintf(writer, format, args...); err != nil {
Logf("Failed to write file %v with test performance data: %v", file.Name(), err)
}
writer.Flush()
}
}
const ( const (
// preconfiguredRuntimeHandler is the name of the runtime handler that is expected to be // preconfiguredRuntimeHandler is the name of the runtime handler that is expected to be
// preconfigured in the test environment. // preconfigured in the test environment.