@@ -121,22 +121,22 @@ var _ = SIGDescribe("NodeProblemDetector", func() {
121
121
psCmd := "ps aux | grep [n]ode-problem-detector"
122
122
result , err = e2essh .SSH (ctx , psCmd , host , framework .TestContext .Provider )
123
123
framework .ExpectNoError (err )
124
- framework . ExpectEqual (result .Code , 0 )
124
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
125
125
gomega .Expect (result .Stdout ).To (gomega .ContainSubstring ("node-problem-detector" ))
126
126
127
127
ginkgo .By (fmt .Sprintf ("Check node-problem-detector is running fine on node %q" , host ))
128
128
journalctlCmd := "sudo journalctl -r -u node-problem-detector"
129
129
result , err = e2essh .SSH (ctx , journalctlCmd , host , framework .TestContext .Provider )
130
130
framework .ExpectNoError (err )
131
- framework . ExpectEqual (result .Code , 0 )
131
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
132
132
gomega .Expect (result .Stdout ).NotTo (gomega .ContainSubstring ("node-problem-detector.service: Failed" ))
133
133
134
134
// We only will check for the KubeletStart even if parsing of date here succeeded.
135
135
ginkgo .By (fmt .Sprintf ("Check when node-problem-detector started on node %q" , host ))
136
136
npdStartTimeCommand := "sudo systemctl show --timestamp=utc node-problem-detector -P ActiveEnterTimestamp"
137
137
result , err = e2essh .SSH (ctx , npdStartTimeCommand , host , framework .TestContext .Provider )
138
138
framework .ExpectNoError (err )
139
- framework . ExpectEqual (result .Code , 0 )
139
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
140
140
141
141
// The time format matches the systemd format.
142
142
// 'utc': 'Day YYYY-MM-DD HH:MM:SS UTC (see https://www.freedesktop.org/software/systemd/man/systemd.time.html)
@@ -157,7 +157,7 @@ var _ = SIGDescribe("NodeProblemDetector", func() {
157
157
injectLogCmd := "sudo sh -c \" echo 'kernel: " + log + "' >> /dev/kmsg\" "
158
158
result , err = e2essh .SSH (ctx , injectLogCmd , host , framework .TestContext .Provider )
159
159
framework .ExpectNoError (err )
160
- framework . ExpectEqual (result .Code , 0 )
160
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
161
161
}
162
162
163
163
ginkgo .By ("Check node-problem-detector can post conditions and events to API server" )
@@ -297,7 +297,7 @@ func getMemoryStat(ctx context.Context, f *framework.Framework, host string) (rs
297
297
298
298
result , err := e2essh .SSH (ctx , memCmd , host , framework .TestContext .Provider )
299
299
framework .ExpectNoError (err )
300
- framework . ExpectEqual (result .Code , 0 )
300
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
301
301
lines := strings .Split (result .Stdout , "\n " )
302
302
303
303
memoryUsage , err := strconv .ParseFloat (lines [0 ], 64 )
@@ -351,7 +351,7 @@ func getCPUStat(ctx context.Context, f *framework.Framework, host string) (usage
351
351
352
352
result , err := e2essh .SSH (ctx , cpuCmd , host , framework .TestContext .Provider )
353
353
framework .ExpectNoError (err )
354
- framework . ExpectEqual (result .Code , 0 )
354
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
355
355
lines := strings .Split (result .Stdout , "\n " )
356
356
357
357
usage , err = strconv .ParseFloat (lines [0 ], 64 )
@@ -367,7 +367,7 @@ func getCPUStat(ctx context.Context, f *framework.Framework, host string) (usage
367
367
func isHostRunningCgroupV2 (ctx context.Context , f * framework.Framework , host string ) bool {
368
368
result , err := e2essh .SSH (ctx , "stat -fc %T /sys/fs/cgroup/" , host , framework .TestContext .Provider )
369
369
framework .ExpectNoError (err )
370
- framework . ExpectEqual (result .Code , 0 )
370
+ gomega . Expect (result .Code ). To ( gomega . Equal ( 0 ) )
371
371
372
372
// 0x63677270 == CGROUP2_SUPER_MAGIC
373
373
// https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
0 commit comments