Skip to content

Conversation

@Aaditya-ops-cpu
Copy link

This PR addresses the // TODO in resolver_test.go by implementing the verification logic for testResolver.

Changes:

  1. Implemented testResolver:

    • Added logic to verify that FindFileByPath correctly returns the expected file (desc_test1.proto).
    • Added a negative test case to ensure it returns an error for non-existent files.
  2. Updated registry_test.go:

    • TestRegistry and TestFromFiles previously passed empty registries to the helper.
    • Since testResolver now strictly checks for desc_test1.proto, I updated these tests to register the file before calling the helper, ensuring they pass.

Verification:-

  • Ran make test locally , all tests passed, including the new logic.
  • Ran make ci locally which failed at the errcheck step due to a local toolchain issue (internal error: package ... without types), but the code generation and tests are clean. Relying on GitHub Actions for the final lint check.

Verification Screenshot: -
Screenshot from 2026-01-13 17-37-21

@Aaditya-ops-cpu
Copy link
Author

Aaditya-ops-cpu commented Jan 13, 2026

Note: This PR builds upon previous PR (which sets up the test files). I merged those changes here to verify the tests pass locally.

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