You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// add a success so we flake (or pass) and don't fail
602
+
ret=append(ret, &junitapi.JUnitTestCase{Name: testName, SystemOut: "Passing the case to make the overall test case flake as the previous failure is expected"})
Name: fmt.Sprintf("[bz-Machine Config Operator] clusteroperator/machine-config must go Progressing=True during an upgrade test"),
649
+
Duration: duration,
650
+
}
651
+
ifmachineConfigProgressingStart.IsZero() {
652
+
mcTestCase.FailureOutput=&junitapi.FailureOutput{
653
+
Output: fmt.Sprintf("machine-config was never Progressing=True during the upgrade window from %s to %s", start.Format(time.RFC3339), stop.Format(time.RFC3339)),
654
+
}
655
+
return []*junitapi.JUnitTestCase{mcTestCase}
656
+
} else {
657
+
mcTestCase.SystemOut=fmt.Sprintf("machine-config became Progressing=True at %s during the upgrade window from %s to %s", machineConfigProgressingStart.Format(time.RFC3339), start.Format(time.RFC3339), stop.Format(time.RFC3339))
output:=fmt.Sprintf("%d (out of %d) unexpected clusteroperator state transitions while machine-config is progressing during the upgrade window from %s to %s", len(fatal), len(operatorEvents), start.Format(time.RFC3339), stop.Format(time.RFC3339))
760
+
iflen(fatal) >0 {
761
+
output=fmt.Sprintf("%s. These did not match any known exceptions, so they cause this test-case to fail:\n\n%v\n", output, strings.Join(fatal, "\n"))
762
+
} else {
763
+
output=fmt.Sprintf("%s, as desired.", output)
764
+
}
765
+
output=fmt.Sprintf("%s\n%d unwelcome but acceptable clusteroperator state transitions while machine-config is progressing during the upgrade window from %s to %s", output, len(excepted), start.Format(time.RFC3339), stop.Format(time.RFC3339))
766
+
iflen(excepted) >0 {
767
+
output=fmt.Sprintf("%s. These should not happen, but because they are tied to exceptions, the fact that they did happen is not sufficient to cause this test-case to fail:\n\n%v\n", output, strings.Join(excepted, "\n"))
768
+
} else {
769
+
output=fmt.Sprintf("%s, as desired.", output)
770
+
}
771
+
772
+
iflen(fatal) >0||len(excepted) >0 {
773
+
// add a failure so we
774
+
// either flake (or pass) in case len(fatal) == 0 by adding a success to the same test
775
+
// or fail in case len(fatal) > 0 by leaving the failure as the only output for the test
776
+
ret=append(ret, &junitapi.JUnitTestCase{
777
+
Name: testName,
778
+
Duration: duration,
779
+
SystemOut: output,
780
+
FailureOutput: &junitapi.FailureOutput{
781
+
Output: output,
782
+
},
783
+
})
784
+
}
785
+
786
+
iflen(fatal) ==0 {
787
+
iflen(excepted) >0 {
600
788
// add a success so we flake (or pass) and don't fail
789
+
ret=append(ret, &junitapi.JUnitTestCase{Name: testName, SystemOut: "Passing the case to make the overall test case flake as the previous failure is expected"})
0 commit comments