Skip to content

Conversation

@artem-tkachuk
Copy link

@artem-tkachuk artem-tkachuk commented Oct 26, 2025

  • Propagate Verify() failures instead of returning nil in the registry path
    Add registryCommandWith(ctx, args, newStore) to inject a store factory for tests – current and future :)
  • Add a unit test using a fake store to assert Verify() errors are returned

@artem-tkachuk artem-tkachuk marked this pull request as draft October 26, 2025 23:35
Fix returning nil on Verify failure in the registry path.

Add a small testable wrapper (registryCommandWith) that accepts a
store factory, allowing tests to inject a fake containerd-backed store
and assert that Verify errors are propagated.

Add a unit test using the wrapper and a fake store to ensure the
registry command returns an error when Verify fails.
@artem-tkachuk artem-tkachuk force-pushed the containerd-verify-return-err branch from bd13a1f to d33e32d Compare October 26, 2025 23:38
@artem-tkachuk artem-tkachuk changed the title main: return Verify error; add dependency injection for containerd store main: return Verify error; add dependency injection wrapper for testability Oct 26, 2025
@artem-tkachuk artem-tkachuk marked this pull request as ready for review October 26, 2025 23:39
err = ociStore.Verify(ctx, args.ContainerdRegistryConfigPath)
if err != nil {
return nil
return err
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual change in this PR – everything else is testing infra and a test to show the failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant