diff --git a/test/e2e_node/hugepages_test.go b/test/e2e_node/hugepages_test.go index 551e3d531c9..c57f301d5f3 100644 --- a/test/e2e_node/hugepages_test.go +++ b/test/e2e_node/hugepages_test.go @@ -214,7 +214,11 @@ var _ = SIGDescribe("HugePages [Serial] [Feature:HugePages][NodeSpecialFeature:H framework.ExpectNoError(err, "while getting node status") ginkgo.By("Verifying that the node now supports huge pages with size 3Mi") - 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") + value, ok := node.Status.Capacity["hugepages-3Mi"] + if !ok { + framework.Failf("capacity should contain resource hugepages-3Mi: %v", node.Status.Capacity) + } + gomega.Expect(value.String()).To(gomega.Equal("9Mi"), "huge pages with size 3Mi should be supported") ginkgo.By("restarting the node and verifying that huge pages with size 3Mi are not supported") restartKubelet(true)