internal/extsvc/github: Testing improvements
Created by: indradhanush
Stacked on top of #34172.
Reviewer notes
This PR does the following:
- Remove unused code and add debug log statements in internal/extsvc/github/common.go.
- Moves existing tests in internal/extsvc/github/common_test.go to their respective places in internal/extsvc/github/v3_test.go and internal/extsvc/github/v4_test.go.
- Adds new tests for
GetRepository
and improves testing forListOrganizations
for cached responses in internal/extsvc/github/v3_test.go. - Adds a helpful comment in internal/extsvc/github/vcr_test.go.
- Removes outdated comment and updates existing one in internal/extsvc/github/v3.go.
- Sets up a default HTTP transport cache in internal/httpcli/client.go and uses it in internal/httptestutil/recorder.go.
Test plan
No functional change. Updates and additions to testing and removal of outdated code and comments.