Skip to content

internal/extsvc/github: Testing improvements

Administrator requested to merge ig/github-caching into main

Created by: indradhanush

Stacked on top of #34172.

Reviewer notes

This PR does the following:

  1. Remove unused code and add debug log statements in internal/extsvc/github/common.go.
  2. 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.
  3. Adds new tests for GetRepository and improves testing for ListOrganizations for cached responses in internal/extsvc/github/v3_test.go.
  4. Adds a helpful comment in internal/extsvc/github/vcr_test.go.
  5. Removes outdated comment and updates existing one in internal/extsvc/github/v3.go.
  6. 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.

Merge request reports

Loading