mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #12252 from alex-mohr/stamp
Add timestamps to test info logs
This commit is contained in:
commit
65bff3d187
@ -195,16 +195,20 @@ type RCConfig struct {
|
||||
MaxContainerFailures *int
|
||||
}
|
||||
|
||||
func nowStamp() string {
|
||||
return time.Now().Format(time.StampMilli)
|
||||
}
|
||||
|
||||
func Logf(format string, a ...interface{}) {
|
||||
fmt.Fprintf(GinkgoWriter, "INFO: "+format+"\n", a...)
|
||||
fmt.Fprintf(GinkgoWriter, nowStamp()+": INFO: "+format+"\n", a...)
|
||||
}
|
||||
|
||||
func Failf(format string, a ...interface{}) {
|
||||
Fail(fmt.Sprintf(format, a...), 1)
|
||||
Fail(nowStamp()+": "+fmt.Sprintf(format, a...), 1)
|
||||
}
|
||||
|
||||
func Skipf(format string, args ...interface{}) {
|
||||
Skip(fmt.Sprintf(format, args...))
|
||||
Skip(nowStamp() + ": " + fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
func SkipUnlessNodeCountIsAtLeast(minNodeCount int) {
|
||||
|
Loading…
Reference in New Issue
Block a user