fix Huge Pages failing test

This commit is contained in:
carlory 2023-10-16 23:13:32 +08:00
parent c7d270302c
commit 5d0f8530f6

View File

@ -214,7 +214,11 @@ var _ = SIGDescribe("HugePages [Serial] [Feature:HugePages][NodeSpecialFeature:H
framework.ExpectNoError(err, "while getting node status") framework.ExpectNoError(err, "while getting node status")
ginkgo.By("Verifying that the node now supports huge pages with size 3Mi") 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") ginkgo.By("restarting the node and verifying that huge pages with size 3Mi are not supported")
restartKubelet(true) restartKubelet(true)