mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
Merge pull request #122073 from carlory/ktesting-format
uncomment ktesting.AnyToString
This commit is contained in:
commit
ad1ea5d456
@ -28,7 +28,7 @@ import (
|
|||||||
_ "k8s.io/component-base/logs/testinit"
|
_ "k8s.io/component-base/logs/testinit"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/klog/v2/ktesting"
|
"k8s.io/klog/v2/ktesting"
|
||||||
// "k8s.io/kubernetes/test/utils/format"
|
"k8s.io/kubernetes/test/utils/format"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -48,13 +48,9 @@ func SetDefaultVerbosity(v int) {
|
|||||||
// specific to Kubernetes.
|
// specific to Kubernetes.
|
||||||
func NewTestContext(tl ktesting.TL) (klog.Logger, context.Context) {
|
func NewTestContext(tl ktesting.TL) (klog.Logger, context.Context) {
|
||||||
config := ktesting.NewConfig(
|
config := ktesting.NewConfig(
|
||||||
// TODO (pohly): merge
|
ktesting.AnyToString(func(v interface{}) string {
|
||||||
// https://github.com/kubernetes/klog/pull/363, new klog
|
return format.Object(v, 1)
|
||||||
// release, update and merge
|
}),
|
||||||
// https://github.com/kubernetes/kubernetes/pull/115277, then
|
|
||||||
// uncomment this.
|
|
||||||
//
|
|
||||||
// ktesting.AnyToString(format.AnyToString),
|
|
||||||
ktesting.VerbosityFlagName("v"),
|
ktesting.VerbosityFlagName("v"),
|
||||||
ktesting.VModuleFlagName("vmodule"),
|
ktesting.VModuleFlagName("vmodule"),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user