You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chore: Add testify-based HTTP mocking infrastructure and pilot migration (#1606)
* Initial plan
* Add testify/mock-based HTTP mocking infrastructure and migrate git_test.go
- Add MockHTTPClientWithHandlers helper function for HTTP-level mocking
- Add path pattern matching support for GitHub API endpoints
- Migrate pkg/github/git_test.go from go-github-mock to new infrastructure
- Keep go-github-mock dependency for now (other files still use it)
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Complete pilot migration and add migration documentation
- Migrate pkg/github/code_scanning_test.go to new infrastructure
- Add comprehensive migration documentation in docs/testing-migration.md
- Fix linter warning in helper_test.go
- All tests and lint checks pass
- 2 of 16 test files migrated, 14 remaining for incremental migration
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Address code review feedback: consolidate transport implementations
- Remove unused OnAny method
- Extract executeHandler helper to eliminate code duplication
- Consolidate MockHTTPClientWithHandler to use MockHTTPClientWithHandlers
- Simplify transport implementation (single multiHandlerTransport)
- All tests and lint checks pass
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Remove docs/testing-migration.md per review feedback
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Reuse mock.EndpointPattern constants instead of hardcoded paths
- Add mock import to code_scanning_test.go and git_test.go
- Replace hardcoded paths with mock.GetRepos*.Pattern references
- Ensures consistency with existing test patterns and easier maintenance
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
* Define endpoint path constants in this repo instead of reusing go-github-mock
- Add endpoint pattern constants to helper_test.go
- Update code_scanning_test.go to use new constants
- Update git_test.go to use new constants
- Removes dependency on go-github-mock endpoint patterns
- Prepares for eventual removal of go-github-mock dependency
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
Co-authored-by: JoannaaKL <joannaakl@github.com>
0 commit comments