mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-18 23:45:11 +00:00
migrate log to structure log
Signed-off-by: jyz0309 <45495947@qq.com> add klog.Kobj Signed-off-by: jyz0309 <45495947@qq.com> use KObj Signed-off-by: jyz0309 <45495947@qq.com> address comment Signed-off-by: jyz0309 <45495947@qq.com> remove useless var Signed-off-by: jyz0309 <45495947@qq.com> format code Signed-off-by: jyz0309 <45495947@qq.com> address comment Signed-off-by: jyz0309 <45495947@qq.com> use err key Signed-off-by: jyz0309 <45495947@qq.com> use PVC Signed-off-by: jyz0309 <45495947@qq.com> improve log message Signed-off-by: jyz0309 <45495947@qq.com> address comment Signed-off-by: jyz0309 <45495947@qq.com> use pod instead podName Signed-off-by: jyz0309 <45495947@qq.com>
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1546,7 +1548,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 {
|
||||
@@ -2087,7 +2089,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