Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
  • Loading branch information
Skarlso and frewilhelm authored Jan 16, 2025
1 parent 67eac02 commit 7a22e62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/ocm/fakes/fakes.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (m *MockFetcher) GetLatestComponentVersionWasNotCalled() bool {
return len(m.getLatestComponentVersionCalledWith) == 0
}

func (m *MockFetcher) ListComponentVersions(ctx context.Context, logger logr.Logger, octx ocm.Context, obj *v1alpha1.ComponentVersion) ([]ocmctrl.Version, error) {
func (m *MockFetcher) ListComponentVersions(_ context.Context, _ logr.Logger, _ ocm.Context, obj *v1alpha1.ComponentVersion) ([]ocmctrl.Version, error) {
m.listComponentVersionsCalledWith = append(m.listComponentVersionsCalledWith, []any{obj})
return m.listComponentVersionsVersions, m.listComponentVersionsErr
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ocm/ocm.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (c *Client) ListComponentVersions(

var result []Version
for _, v := range versions {
// make sure we don't do any lookup if we don't need to
// make sure to verify the component if specified
if len(obj.Spec.Verify) > 0 {
if _, err := c.VerifyComponent(ctx, octx, obj, v); err != nil {
logger.Error(err, "ignoring version as it failed verification", "version", v, "component", obj.Spec.Component)
Expand Down

0 comments on commit 7a22e62

Please sign in to comment.