Skip to content

test(engine): add unit tests for commit metadata extraction#6382

Open
sachin9058 wants to merge 5 commits into
mindersec:mainfrom
sachin9058:test/commitinfo
Open

test(engine): add unit tests for commit metadata extraction#6382
sachin9058 wants to merge 5 commits into
mindersec:mainfrom
sachin9058:test/commitinfo

Conversation

@sachin9058
Copy link
Copy Markdown
Contributor

Summary

This PR adds unit tests for the commit metadata extraction logic introduced in the commitinfo package.

It builds on the commit iteration and metadata abstraction work introduced in #6380 , and focuses on validating that commit data is correctly normalized into a provider-agnostic structure.

The tests verify extraction of key fields such as SHA, commit message (first line), and author name. Additionally, edge cases such as empty commit objects are covered to ensure robustness.

This change is scoped to testing only and does not introduce any functional changes.

Fixes #2176

Testing

  • Added unit tests for commitinfo.Extract
  • Verified correct extraction of:
    • commit SHA
    • first line of commit message
    • author name
  • Covered edge cases with empty commit objects
  • Ran full test suite:
    go test ./...

@sachin9058 sachin9058 requested a review from a team as a code owner April 17, 2026 16:42
@sachin9058
Copy link
Copy Markdown
Contributor Author

sachin9058 commented Apr 17, 2026

This PR builds on the commit metadata extraction work in #6380 and focuses on adding test coverage for that functionality.
This helps ensure correctness and stability of the commit metadata abstraction layer.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage is 60.126%sachin9058:test/commitinfo into mindersec:main. No base build found for mindersec:main.

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.

Not all commits being added to main are checked during PR

2 participants