Skip to content

Commit 7a22e62

Browse files
Skarlsofrewilhelm
andauthored
Apply suggestions from code review
Co-authored-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
1 parent 67eac02 commit 7a22e62

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/ocm/fakes/fakes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (m *MockFetcher) GetLatestComponentVersionWasNotCalled() bool {
150150
return len(m.getLatestComponentVersionCalledWith) == 0
151151
}
152152

153-
func (m *MockFetcher) ListComponentVersions(ctx context.Context, logger logr.Logger, octx ocm.Context, obj *v1alpha1.ComponentVersion) ([]ocmctrl.Version, error) {
153+
func (m *MockFetcher) ListComponentVersions(_ context.Context, _ logr.Logger, _ ocm.Context, obj *v1alpha1.ComponentVersion) ([]ocmctrl.Version, error) {
154154
m.listComponentVersionsCalledWith = append(m.listComponentVersionsCalledWith, []any{obj})
155155
return m.listComponentVersionsVersions, m.listComponentVersionsErr
156156
}

pkg/ocm/ocm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ func (c *Client) ListComponentVersions(
489489

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

0 commit comments

Comments
 (0)