finish splitting each part of the upgrade into distinct junit
@@ -332,10 +332,15 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
go monitor.Disrupt(ctx, kubeClient, upgradeDisruptRebootPolicy)
// observe the upgrade, taking action as necessary
+ if err := disruption.RecordJUnit(
+ f,
+ "[sig-cluster-lifecycle] Cluster completes upgrade",
+ func() error {
framework.Logf("Cluster version operator acknowledged upgrade request")
aborted := false
var lastMessage string
upgradeStarted := time.Now()
+
if err := wait.PollImmediate(10*time.Second, maximumDuration, func() (bool, error) {
cv, msg, err := monitor.Check(updated.Generation, desired)
if msg != "" {
@@ -384,11 +389,21 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
upgradeEnded := time.Now()
upgradeDuration := upgradeEnded.Sub(upgradeStarted)
if upgradeDuration > durationToSoftFailure {
- disruption.RecordJUnitResult(f, "cluster upgrade should be fast", upgradeDuration, fmt.Sprintf("Upgrade took too long: %v", upgradeDuration.Minutes()))
+ disruption.RecordJUnitResult(f, "[sig-cluster-lifecycle] cluster upgrade should be fast", upgradeDuration, fmt.Sprintf("Upgrade took too long: %v", upgradeDuration.Minutes()))
} else {
- disruption.RecordJUnitResult(f, "cluster upgrade should be fast", upgradeDuration, "")
+ disruption.RecordJUnitResult(f, "[sig-cluster-lifecycle] cluster upgrade should be fast", upgradeDuration, "")
+ }
+
+ return nil
+ },
+ ); err != nil {
+ return err
}
+ if err := disruption.RecordJUnit(
+ f,
+ "[sig-mco] Machine config pools complete upgrade",
+ func() error {
framework.Logf("Waiting on pools to be upgraded")
if err := wait.PollImmediate(10*time.Second, 30*time.Minute, func() (bool, error) {
mcps := dc.Resource(schema.GroupVersionResource{
@@ -415,6 +430,11 @@ func clusterUpgrade(f *framework.Framework, c configv1client.Interface, dc dynam
return fmt.Errorf("Pools did not complete upgrade: %v", err)
}
framework.Logf("All pools completed upgrade")
+ return nil
+ },
+ ); err != nil {
+ return err
+ }
return nil
}
