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
This commit is contained in:
@@ -64,7 +64,7 @@ go_test(
|
||||
"//test/integration/framework:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/klog:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -36,7 +36,7 @@ import (
|
||||
_ "k8s.io/kubernetes/pkg/scheduler/algorithmprovider"
|
||||
testutils "k8s.io/kubernetes/test/utils"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
var lowPriority, mediumPriority, highPriority = int32(100), int32(200), int32(300)
|
||||
@@ -481,7 +481,7 @@ func TestPreemptionStarvation(t *testing.T) {
|
||||
t.Errorf("Preemptor pod %v didn't get scheduled: %v", preemptor.Name, err)
|
||||
}
|
||||
// Cleanup
|
||||
glog.Info("Cleaning up all pods...")
|
||||
klog.Info("Cleaning up all pods...")
|
||||
allPods := pendingPods
|
||||
allPods = append(allPods, runningPods...)
|
||||
allPods = append(allPods, preemptor)
|
||||
|
@@ -26,7 +26,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
@@ -191,7 +191,7 @@ func TestVolumeBinding(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, test := range cases {
|
||||
glog.Infof("Running test %v", name)
|
||||
klog.Infof("Running test %v", name)
|
||||
|
||||
// Create two StorageClasses
|
||||
suffix := rand.String(4)
|
||||
@@ -335,7 +335,7 @@ func TestVolumeBindingRescheduling(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, test := range cases {
|
||||
glog.Infof("Running test %v", name)
|
||||
klog.Infof("Running test %v", name)
|
||||
|
||||
if test.pod == nil {
|
||||
t.Fatal("pod is required for this test")
|
||||
@@ -363,7 +363,7 @@ func TestVolumeBindingRescheduling(t *testing.T) {
|
||||
}
|
||||
|
||||
// Wait for pod is unschedulable.
|
||||
glog.Infof("Waiting for pod is unschedulable")
|
||||
klog.Infof("Waiting for pod is unschedulable")
|
||||
if err := waitForPodUnschedulable(config.client, test.pod); err != nil {
|
||||
t.Errorf("Failed as Pod %s was not unschedulable: %v", test.pod.Name, err)
|
||||
}
|
||||
@@ -373,12 +373,12 @@ func TestVolumeBindingRescheduling(t *testing.T) {
|
||||
|
||||
// Wait for pod is scheduled or unscheduable.
|
||||
if !test.shouldFail {
|
||||
glog.Infof("Waiting for pod is scheduled")
|
||||
klog.Infof("Waiting for pod is scheduled")
|
||||
if err := waitForPodToSchedule(config.client, test.pod); err != nil {
|
||||
t.Errorf("Failed to schedule Pod %q: %v", test.pod.Name, err)
|
||||
}
|
||||
} else {
|
||||
glog.Infof("Waiting for pod is unschedulable")
|
||||
klog.Infof("Waiting for pod is unschedulable")
|
||||
if err := waitForPodUnschedulable(config.client, test.pod); err != nil {
|
||||
t.Errorf("Failed as Pod %s was not unschedulable: %v", test.pod.Name, err)
|
||||
}
|
||||
@@ -737,7 +737,7 @@ func TestVolumeProvision(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, test := range cases {
|
||||
glog.Infof("Running test %v", name)
|
||||
klog.Infof("Running test %v", name)
|
||||
|
||||
// Create StorageClasses
|
||||
suffix := rand.String(4)
|
||||
|
Reference in New Issue
Block a user