changes in test files

This commit is contained in:
kidddddddddddddddddddddd
2022-10-12 22:11:04 +08:00
parent 121d24cfc7
commit b901ef0f68
7 changed files with 117 additions and 60 deletions

View File

@@ -1667,7 +1667,7 @@ func TestFilterPluginsWithNominatedPods(t *testing.T) {
podNominator := internalqueue.NewPodNominator(nil)
if tt.nominatedPod != nil {
podNominator.AddNominatedPod(
framework.NewPodInfo(tt.nominatedPod),
mustNewPodInfo(t, tt.nominatedPod),
&framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: nodeName})
}
profile := config.KubeSchedulerProfile{Plugins: cfgPls}
@@ -2688,3 +2688,11 @@ func collectAndComparePermitWaitDuration(t *testing.T, wantRes string) {
}
}
}
func mustNewPodInfo(t *testing.T, pod *v1.Pod) *framework.PodInfo {
podInfo, err := framework.NewPodInfo(pod)
if err != nil {
t.Fatal(err)
}
return podInfo
}