Skip to content

Commit

Permalink
fix: Default no module manager found to state Ready (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius authored Sep 10, 2024
1 parent 2ad71dd commit 8474607
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/manifest/statecheck/state_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (m *ManagerStateCheck) GetState(ctx context.Context,
) (shared.State, error) {
mgr := findManager(clnt, resources)
if mgr == nil {
return shared.StateError, ErrNoManagerProvided
return shared.StateReady, nil
}

switch mgr.kind {
Expand All @@ -71,7 +71,7 @@ func (m *ManagerStateCheck) GetState(ctx context.Context,
}

// fall through that should not be reached
return shared.StateError, ErrNoStateDetermined
return shared.StateReady, nil
}

func findManager(clt client.Client, resources []*resource.Info) *Manager {
Expand Down
2 changes: 1 addition & 1 deletion internal/manifest/statecheck/state_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestManagerStateCheck_GetState(t *testing.T) {
resources: []*resource.Info{},
isDeployment: false,
isStateFulSet: false,
expectedError: statecheck.ErrNoManagerProvided,
expectedError: nil,
},
}
for _, testCase := range tests {
Expand Down

0 comments on commit 8474607

Please sign in to comment.