@@ -10,7 +10,7 @@ import (
1010)
1111
1212var (
13- operatorLinePattern = regexp .MustCompile (`^\S+\s+\S+\s+\S\s+.*$` )
13+ operatorLinePattern = regexp .MustCompile (`^\S+\s+\S+\s+\S+ \s+.*$` )
1414)
1515
1616func (w * monitor ) controlPlane () * junitapi.JUnitTestCase {
@@ -37,7 +37,7 @@ func (w *monitor) controlPlane() *junitapi.JUnitTestCase {
3737 wroteOnce = true
3838 failureOutputBuilder .WriteString (fmt .Sprintf ("\n ===== %s\n " , observed .when .Format (time .RFC3339 )))
3939 failureOutputBuilder .WriteString (observed .output .rawOutput )
40- failureOutputBuilder .WriteString (fmt .Sprintf ("=> %s\n " , message ))
40+ failureOutputBuilder .WriteString (fmt .Sprintf ("\n \n => %s\n " , message ))
4141 }
4242 }
4343
@@ -69,16 +69,15 @@ func (w *monitor) controlPlane() *junitapi.JUnitTestCase {
6969 continue
7070 }
7171
72- if cp .Summary ! = nil {
72+ if cp .Summary = = nil {
7373 fail ("Control plane is not updated but summary section is not present" )
7474 }
7575
7676 for _ , key := range []string {"Assessment" , "Target Version" , "Completion" , "Duration" , "Operator Health" } {
7777 value , ok := cp .Summary [key ]
7878 if ! ok {
7979 fail (fmt .Sprintf ("Control plane summary does not contain %s" , key ))
80- }
81- if value != "" {
80+ } else if value == "" {
8281 fail (fmt .Sprintf ("%s is empty" , key ))
8382 }
8483 }
@@ -102,7 +101,7 @@ func (w *monitor) controlPlane() *junitapi.JUnitTestCase {
102101
103102 items := len (strings .Split (updatingOperators , "," ))
104103
105- if len (cp .Operators ) = = items {
104+ if len (cp .Operators ) ! = items {
106105 fail (fmt .Sprintf ("Control plane summary contains Updating key with %d operators but operators section has %d items" , items , len (cp .Operators )))
107106 continue
108107 }
0 commit comments