@@ -225,12 +225,12 @@ var _ = SIGDescribe("HugePages", framework.WithSerial(), feature.HugePages, "[No
225
225
restartKubelet (true )
226
226
227
227
ginkgo .By ("verifying that the hugepages-3Mi resource no longer is present" )
228
- gomega .Eventually (ctx , func () resource. Quantity {
228
+ gomega .Eventually (ctx , func () bool {
229
229
node , err = f .ClientSet .CoreV1 ().Nodes ().Get (ctx , framework .TestContext .NodeName , metav1.GetOptions {})
230
230
framework .ExpectNoError (err , "while getting node status" )
231
- // abc, error := node.Status.Capacity["hugepages-3Mi"]
232
- return node . Status . Capacity [ "hugepages-3Mi" ]
233
- }, 30 * time .Second , framework .Poll ).Should (gomega .BeNil ( ))
231
+ _ , isPresent := node .Status .Capacity ["hugepages-3Mi" ]
232
+ return isPresent
233
+ }, 30 * time .Second , framework .Poll ).Should (gomega .BeFalseBecause ( "hugepages resource should not be present" ))
234
234
})
235
235
236
236
ginkgo .It ("should add resources for new huge page sizes on kubelet restart" , func (ctx context.Context ) {
@@ -245,11 +245,12 @@ var _ = SIGDescribe("HugePages", framework.WithSerial(), feature.HugePages, "[No
245
245
startKubelet ()
246
246
247
247
ginkgo .By ("verifying that the hugepages-2Mi resource is present" )
248
- gomega .Eventually (ctx , func () resource. Quantity {
248
+ gomega .Eventually (ctx , func () bool {
249
249
node , err := f .ClientSet .CoreV1 ().Nodes ().Get (ctx , framework .TestContext .NodeName , metav1.GetOptions {})
250
250
framework .ExpectNoError (err , "while getting node status" )
251
- return node .Status .Capacity ["hugepages-2Mi" ]
252
- }, 30 * time .Second , framework .Poll ).ShouldNot (gomega .BeNil ())
251
+ _ , isPresent := node .Status .Capacity ["hugepages-2Mi" ]
252
+ return isPresent
253
+ }, 30 * time .Second , framework .Poll ).Should (gomega .BeTrueBecause ("hugepages resource should be present" ))
253
254
})
254
255
255
256
ginkgo .When ("start the pod" , func () {
0 commit comments