Skip to content

Commit d953755

Browse files
authored
Merge pull request kubernetes#121266 from carlory/cleanup-e2enode-framework-equal
fix Huge Pages failing test
2 parents bd07d56 + 5d0f853 commit d953755

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e_node/hugepages_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ var _ = SIGDescribe("HugePages [Serial] [Feature:HugePages][NodeSpecialFeature:H
214214
framework.ExpectNoError(err, "while getting node status")
215215

216216
ginkgo.By("Verifying that the node now supports huge pages with size 3Mi")
217-
gomega.Expect(node.Status.Capacity).To(gomega.HaveKeyWithValue("hugepages-3Mi", resource.MustParse("9Mi")), "capacity should contain resource hugepages-3Mi and huge pages with size 3Mi should be supported")
217+
value, ok := node.Status.Capacity["hugepages-3Mi"]
218+
if !ok {
219+
framework.Failf("capacity should contain resource hugepages-3Mi: %v", node.Status.Capacity)
220+
}
221+
gomega.Expect(value.String()).To(gomega.Equal("9Mi"), "huge pages with size 3Mi should be supported")
218222

219223
ginkgo.By("restarting the node and verifying that huge pages with size 3Mi are not supported")
220224
restartKubelet(true)

0 commit comments

Comments
 (0)