diff --git a/pkg/ocm/fakes/fakes.go b/pkg/ocm/fakes/fakes.go index 79c8ebe5..26fb4763 100644 --- a/pkg/ocm/fakes/fakes.go +++ b/pkg/ocm/fakes/fakes.go @@ -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 } diff --git a/pkg/ocm/ocm.go b/pkg/ocm/ocm.go index 6bfb696a..067fded3 100644 --- a/pkg/ocm/ocm.go +++ b/pkg/ocm/ocm.go @@ -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)