Merge pull request #122073 from carlory/ktesting-format
uncomment ktesting.AnyToString
This commit is contained in:
		@@ -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"),
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user