@@ -136,7 +136,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
136
136
if ! ephemeral {
137
137
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
138
138
framework .ExpectNoError (err )
139
- framework . ExpectNotEqual (pvc , nil )
139
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
140
140
}
141
141
142
142
pod := makePod (f , pvc , ephemeral )
@@ -150,8 +150,8 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
150
150
151
151
updatedStorageMetrics := waitForDetachAndGrabMetrics (ctx , storageOpMetrics , metricsGrabber , pluginName )
152
152
153
- framework . ExpectNotEqual ( len ( updatedStorageMetrics .latencyMetrics ), 0 , "Error fetching c-m updated storage metrics" )
154
- framework . ExpectNotEqual ( len ( updatedStorageMetrics .statusMetrics ), 0 , "Error fetching c-m updated storage metrics" )
153
+ gomega . Expect ( updatedStorageMetrics .latencyMetrics ). ToNot ( gomega . BeEmpty () , "Error fetching c-m updated storage metrics" )
154
+ gomega . Expect ( updatedStorageMetrics .statusMetrics ). ToNot ( gomega . BeEmpty () , "Error fetching c-m updated storage metrics" )
155
155
156
156
volumeOperations := []string {"volume_detach" , "volume_attach" }
157
157
@@ -186,7 +186,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
186
186
if ! ephemeral {
187
187
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
188
188
framework .ExpectNoError (err , "failed to create PVC %s/%s" , pvc .Namespace , pvc .Name )
189
- framework . ExpectNotEqual (pvc , nil )
189
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
190
190
}
191
191
192
192
ginkgo .By ("Creating a pod and expecting it to fail" )
@@ -205,14 +205,14 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
205
205
framework .ExpectNoError (err , "failed to get controller manager metrics" )
206
206
updatedStorageMetrics := getControllerStorageMetrics (updatedControllerMetrics , pluginName )
207
207
208
- framework . ExpectNotEqual ( len ( updatedStorageMetrics .statusMetrics ), 0 , "Error fetching c-m updated storage metrics" )
208
+ gomega . Expect ( updatedStorageMetrics .statusMetrics ). ToNot ( gomega . BeEmpty () , "Error fetching c-m updated storage metrics" )
209
209
}
210
210
211
211
filesystemMode := func (ctx context.Context , isEphemeral bool ) {
212
212
if ! isEphemeral {
213
213
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
214
214
framework .ExpectNoError (err )
215
- framework . ExpectNotEqual (pvc , nil )
215
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
216
216
}
217
217
218
218
pod := makePod (f , pvc , isEphemeral )
@@ -277,7 +277,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
277
277
if ! isEphemeral {
278
278
pvcBlock , err = c .CoreV1 ().PersistentVolumeClaims (pvcBlock .Namespace ).Create (ctx , pvcBlock , metav1.CreateOptions {})
279
279
framework .ExpectNoError (err )
280
- framework . ExpectNotEqual (pvcBlock , nil )
280
+ gomega . Expect (pvcBlock ). ToNot ( gomega . BeNil () )
281
281
}
282
282
283
283
pod := makePod (f , pvcBlock , isEphemeral )
@@ -343,7 +343,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
343
343
if ! isEphemeral {
344
344
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
345
345
framework .ExpectNoError (err )
346
- framework . ExpectNotEqual (pvc , nil )
346
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
347
347
}
348
348
349
349
pod := makePod (f , pvc , isEphemeral )
@@ -374,7 +374,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
374
374
if ! isEphemeral {
375
375
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
376
376
framework .ExpectNoError (err )
377
- framework . ExpectNotEqual (pvc , nil )
377
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
378
378
}
379
379
380
380
pod := makePod (f , pvc , isEphemeral )
@@ -404,7 +404,7 @@ var _ = utils.SIGDescribe("[Serial] Volume metrics", func() {
404
404
if ! isEphemeral {
405
405
pvc , err = c .CoreV1 ().PersistentVolumeClaims (pvc .Namespace ).Create (ctx , pvc , metav1.CreateOptions {})
406
406
framework .ExpectNoError (err )
407
- framework . ExpectNotEqual (pvc , nil )
407
+ gomega . Expect (pvc ). ToNot ( gomega . BeNil () )
408
408
}
409
409
410
410
pod := makePod (f , pvc , isEphemeral )
0 commit comments