File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -249,10 +249,15 @@ func checkContainerLogsForErrors(ngfPodName string) {
249
249
& core.PodLogOptions {Container : nginxContainerName },
250
250
)
251
251
Expect (err ).ToNot (HaveOccurred ())
252
- Expect (logs ).ToNot (ContainSubstring ("[error]" ), logs )
253
- Expect (logs ).ToNot (ContainSubstring ("[crit]" ), logs )
254
- Expect (logs ).ToNot (ContainSubstring ("[alert]" ), logs )
255
- Expect (logs ).ToNot (ContainSubstring ("[emerg]" ), logs )
252
+
253
+ for _ , line := range strings .Split (logs , "\n " ) {
254
+ Expect (line ).ToNot (ContainSubstring ("[crit]" ), line )
255
+ Expect (line ).ToNot (ContainSubstring ("[alert]" ), line )
256
+ Expect (line ).ToNot (ContainSubstring ("[emerg]" ), line )
257
+ if strings .Contains (line , "[error]" ) {
258
+ Expect (line ).To (ContainSubstring ("connect() failed (111: Connection refused)" ), line )
259
+ }
260
+ }
256
261
257
262
logs , err = resourceManager .GetPodLogs (
258
263
ngfNamespace ,
You can’t perform that action at this time.
0 commit comments