mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-03 08:04:45 +00:00
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog - klog as explicit InitFlags() so we add them as necessary - we update the other repositories that we vendor that made a similar change from glog to klog * github.com/kubernetes/repo-infra * k8s.io/gengo/ * k8s.io/kube-openapi/ * github.com/google/cadvisor - Entirely remove all references to glog - Fix some tests by explicit InitFlags in their init() methods Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135 Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
This commit is contained in:
committed by
Kubernetes Publisher
parent
b1c1d2e7ca
commit
74cd8bbeee
@@ -35,7 +35,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
@@ -1855,6 +1855,10 @@ func buildString(length int) string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
func init() {
|
||||
klog.InitFlags(nil)
|
||||
}
|
||||
|
||||
func TestTruncateBody(t *testing.T) {
|
||||
tests := []struct {
|
||||
body string
|
||||
@@ -1904,7 +1908,7 @@ func TestTruncateBody(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
l := flag.Lookup("v").Value.(flag.Getter).Get().(glog.Level)
|
||||
l := flag.Lookup("v").Value.(flag.Getter).Get().(klog.Level)
|
||||
for _, test := range tests {
|
||||
flag.Set("v", test.level)
|
||||
got := truncateBody(test.body)
|
||||
|
Reference in New Issue
Block a user