mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-04 22:51:39 +00:00
Merge pull request #105858 from jyz0309/migrate-log
Migrated scheduler files binder.go binder_test.go to structured logging
This commit is contained in:
@@ -19,6 +19,7 @@ package volumebinding
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"sort"
|
||||
"testing"
|
||||
@@ -187,7 +188,8 @@ func newTestBinder(t *testing.T, stopCh <-chan struct{}, csiStorageCapacity ...b
|
||||
informerFactory.Start(stopCh)
|
||||
for v, synced := range informerFactory.WaitForCacheSync(stopCh) {
|
||||
if !synced {
|
||||
klog.Fatalf("Error syncing informer for %v", v)
|
||||
klog.ErrorS(nil, "Error syncing informer", "informer", v)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1528,7 +1530,7 @@ func TestBindAPIUpdate(t *testing.T) {
|
||||
testEnv.assumeVolumes(t, "node1", pod, scenario.bindings, scenario.provisionedPVCs)
|
||||
|
||||
// Execute
|
||||
err := testEnv.internalBinder.bindAPIUpdate(pod.Name, scenario.bindings, scenario.provisionedPVCs)
|
||||
err := testEnv.internalBinder.bindAPIUpdate(pod, scenario.bindings, scenario.provisionedPVCs)
|
||||
|
||||
// Validate
|
||||
if !scenario.shouldFail && err != nil {
|
||||
@@ -2069,7 +2071,7 @@ func TestBindPodVolumes(t *testing.T) {
|
||||
go func(scenario scenarioType) {
|
||||
time.Sleep(5 * time.Second)
|
||||
// Sleep a while to run after bindAPIUpdate in BindPodVolumes
|
||||
klog.V(5).Infof("Running delay function")
|
||||
klog.V(5).InfoS("Running delay function")
|
||||
scenario.delayFunc(t, testEnv, pod, scenario.initPVs, scenario.initPVCs)
|
||||
}(scenario)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user