Enable testing logger in the remaining scheduler tests.

This commit is contained in:
dom4ha
2024-09-09 21:59:24 +00:00
parent 17bae91f20
commit e7827879db
14 changed files with 130 additions and 91 deletions

View File

@@ -732,7 +732,7 @@ func TestRestartableInitContainers(t *testing.T) {
t.Fatal(err)
}
cycleState := framework.NewCycleState()
_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(context.Background(), cycleState, test.pod)
_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
if diff := cmp.Diff(test.wantPreFilterStatus, preFilterStatus); diff != "" {
t.Error("status does not match (-expected +actual):\n", diff)
}
@@ -1112,7 +1112,8 @@ func TestEventsToRegister(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
fp := &Fit{enableInPlacePodVerticalScaling: test.inPlacePodVerticalScalingEnabled}
actualClusterEvents, err := fp.EventsToRegister(context.TODO())
_, ctx := ktesting.NewTestContext(t)
actualClusterEvents, err := fp.EventsToRegister(ctx)
if err != nil {
t.Fatal(err)
}