Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoShaka committed Dec 13, 2024
1 parent a533756 commit 13f116d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/autoupdate/rollout/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (

var (
defaultUpdateDays = []string{"Mon", "Tue", "Wed", "Thu"}
defaultGroup = &autoupdate.AgentAutoUpdateGroup{
defaultGroup = autoupdate.AgentAutoUpdateGroup{
Name: defaultGroupName,
Days: defaultUpdateDays,
StartHour: defaultStartHour,
Expand Down Expand Up @@ -370,7 +370,7 @@ func (r *reconciler) defaultConfigGroup(ctx context.Context) (*autoupdate.AgentA
if err != nil {
if trace.IsNotFound(err) {
// There's no CMC, we return the default group.
return defaultGroup, nil
return &defaultGroup, nil
}

// If we had an error, and it's not trace.ErrNotFound, we stop.
Expand All @@ -381,7 +381,7 @@ func (r *reconciler) defaultConfigGroup(ctx context.Context) (*autoupdate.AgentA

if !ok {
// The CMC is here but does not contain upgrade window.
return defaultGroup, nil
return &defaultGroup, nil
}

weekdays := upgradeWindow.Weekdays
Expand Down
4 changes: 2 additions & 2 deletions lib/autoupdate/rollout/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func TestDefaultConfigGroup(t *testing.T) {
cmcAnswer: callAnswer[*types.ClusterMaintenanceConfigV1]{
nil, trace.NotFound("no cmc"),
},
expectedResult: defaultGroup,
expectedResult: &defaultGroup,
expectError: require.NoError,
},
{
Expand All @@ -902,7 +902,7 @@ func TestDefaultConfigGroup(t *testing.T) {
},
}, nil,
},
expectedResult: defaultGroup,
expectedResult: &defaultGroup,
expectError: require.NoError,
},
{
Expand Down

0 comments on commit 13f116d

Please sign in to comment.