diff --git a/pkg/coscheduling/core/core_test.go b/pkg/coscheduling/core/core_test.go index c57f659c8f..a295ae21a1 100644 --- a/pkg/coscheduling/core/core_test.go +++ b/pkg/coscheduling/core/core_test.go @@ -25,6 +25,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" clientsetfake "k8s.io/client-go/kubernetes/fake" clicache "k8s.io/client-go/tools/cache" @@ -169,6 +170,7 @@ func TestPreFilter(t *testing.T) { scheduleTimeout: &scheduleTimeout, permittedPG: newCache(), backedOffPG: newCache(), + assignedPodsByPG: make(map[string]sets.Set[string]), } informerFactory.Start(ctx.Done()) @@ -268,6 +270,7 @@ func TestPermit(t *testing.T) { snapshotSharedLister: tu.NewFakeSharedLister(tt.existingPods, nodes), podLister: podInformer.Lister(), scheduleTimeout: &scheduleTimeout, + assignedPodsByPG: make(map[string]sets.Set[string]), } informerFactory.Start(ctx.Done())