From 586261291f5faee7ba4351e12c274ee37911e401 Mon Sep 17 00:00:00 2001 From: Jianfei Bai Date: Tue, 29 Oct 2019 11:44:27 +0800 Subject: [PATCH] Remove unused functions in framework.go --- test/e2e/framework/framework.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index aa0ba2c5608..4d04da1cbdf 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -22,11 +22,9 @@ limitations under the License. package framework import ( - "bufio" "bytes" "fmt" "math/rand" - "os" "strings" "sync" "time" @@ -866,18 +864,6 @@ func (cl *ClusterVerification) ForEach(podFunc func(v1.Pod)) error { 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 ( // preconfiguredRuntimeHandler is the name of the runtime handler that is expected to be // preconfigured in the test environment.