mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-08 18:39:16 +00:00
client-go/test: warning handler with contextual logging
The default handler now uses contextual logging. Instead of warnings.go:106] warning 1 it now logs the caller of client-go and uses structured, contextual logging main.go:100] "Warning" message="warning 1" Users of client-go have the choice whether the handler that they provide uses the traditional API (no API break!) or contextual logging. Kubernetes-commit: 48fb886325fce4b16e4067caadb7bcd3044d460f
This commit is contained in:
committed by
Kubernetes Publisher
parent
9897373fe6
commit
2b2015d460
@@ -242,6 +242,9 @@ func TestConfigToExecClusterRoundtrip(t *testing.T) {
|
||||
func(h *WarningHandler, f fuzz.Continue) {
|
||||
*h = &fakeWarningHandler{}
|
||||
},
|
||||
func(h *WarningHandlerWithContext, f fuzz.Continue) {
|
||||
*h = &fakeWarningHandlerWithContext{}
|
||||
},
|
||||
// Authentication does not require fuzzer
|
||||
func(r *AuthProviderConfigPersister, f fuzz.Continue) {},
|
||||
func(r *clientcmdapi.AuthProviderConfig, f fuzz.Continue) {
|
||||
@@ -289,6 +292,7 @@ func TestConfigToExecClusterRoundtrip(t *testing.T) {
|
||||
expected.Burst = 0
|
||||
expected.RateLimiter = nil
|
||||
expected.WarningHandler = nil
|
||||
expected.WarningHandlerWithContext = nil
|
||||
expected.Timeout = 0
|
||||
expected.Dial = nil
|
||||
|
||||
|
Reference in New Issue
Block a user