Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/e2e/upgrade/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"math/rand"
"reflect"
"strings"
"text/tabwriter"
"time"
Expand Down Expand Up @@ -39,7 +38,12 @@ func (m *versionMonitor) Check(initialGeneration int64, desired configv1.Update)
m.lastCV = cv

if cv.Status.ObservedGeneration > initialGeneration {
if cv.Spec.DesiredUpdate == nil || !reflect.DeepEqual(desired, *cv.Spec.DesiredUpdate) {
// configv1.Update is not directly comparable (e.g., ==), so compare
// only the fields that identify the update target.
if cv.Spec.DesiredUpdate == nil ||
desired.Architecture != cv.Spec.DesiredUpdate.Architecture ||
desired.Version != cv.Spec.DesiredUpdate.Version ||
desired.Image != cv.Spec.DesiredUpdate.Image {
return nil, "", fmt.Errorf("desired cluster version was changed by someone else: %v", cv.Spec.DesiredUpdate)
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/extended/util/configv1shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ type ConfigV1ClientShim struct {
}

func (c *ConfigV1ClientShim) InsightsDataGathers() configv1.InsightsDataGatherInterface {
if c.v1Kinds["APIServer"] {
panic(fmt.Errorf("APIServer not implemented"))
if c.v1Kinds["InsightsDataGather"] {
panic(fmt.Errorf("InsightsDataGather not implemented"))
}
return c.configv1.InsightsDataGathers()
}
Expand Down