Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
  • Loading branch information
mikkeloscar committed Mar 25, 2024
1 parent 14694e0 commit f6ca5d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func TestQuickOOMKill(t *testing.T) {
WithOomKill("fake", time.Minute).Get()
}

factory, _ := getEvictionRestrictionFactory(nil, nil, &ss, 2, tolerance)
factory, _ := getEvictionRestrictionFactory(nil, nil, &ss, nil, 2, tolerance)
eviction := factory.NewPodsEvictionRestriction(pods, getBasicVpa())

// All pods can be evicted because they have an oom kill
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func TestDontUpdatePodWithQuickOOMNoResourceChange(t *testing.T) {
}

func TestDontUpdatePodWithOOMNoRecommendationChange(t *testing.T) {
pod := test.Pod().WithName("POD1").AddContainer(test.BuildTestContainer(containerName, "1", "1")).Get()
pod := test.Pod().WithName("POD1").AddContainer(test.Container().WithName(containerName).WithCPURequest(resource.MustParse("1")).WithMemRequest(resource.MustParse("1")).Get()).Get()

timestampNow := pod.Status.StartTime.Time.Add(time.Hour)

Expand Down Expand Up @@ -308,8 +308,8 @@ func TestDontUpdatePodWithOOMNoRecommendationChange(t *testing.T) {

func TestUpdatePodWithOOMAnyContainer(t *testing.T) {
pod := test.Pod().WithName("POD1").
AddContainer(test.BuildTestContainer(containerName, "4", "")).
AddContainer(test.BuildTestContainer(secondContainerName, "4", "")).
AddContainer(test.Container().WithName(containerName).WithCPURequest(resource.MustParse("4")).Get()).
AddContainer(test.Container().WithName(secondContainerName).WithCPURequest(resource.MustParse("4")).Get()).
Get()

// Pretend that the test pod started 11 hours ago.
Expand Down

0 comments on commit f6ca5d1

Please sign in to comment.