Clean up the repository API unit tests and prepare for future work.

Review Request #11319 — Created Dec. 7, 2020 and submitted

Information

Review Board
release-3.0.x

Reviewers

The repository API unit tests were pretty ancient and crufty, and the
helper functions made a lot of assumptions about what was needed for
repository testing and creation that just didn't hold up anymore (mainly
that repositories were never going to be backed by hosting services). On
top of this, we overrode all kinds of class-level functions directly,
without using kgb, which wasn't very safe.

This cruft is blocking work on finally getting this API into shape to
allow creation of repositories backed by hosting services.

This change cleans up the tests, removing some of the bad assumptions,
making the helper functions more generally useful, moving code to kgb,
and otherwise just simplifying the tests.

Unit tests pass.

Summary ID
Clean up the repository API unit tests and prepare for future work.
The repository API unit tests were pretty ancient and crufty, and the helper functions made a lot of assumptions about what was needed for repository testing and creation that just didn't hold up anymore (mainly that repositories were never going to be backed by hosting services). On top of this, we overrode all kinds of class-level functions directly, without using kgb, which wasn't very safe. This cruft is blocking work on finally getting this API into shape to allow creation of repositories backed by hosting services. This change cleans up the tests, removing some of the bad assumptions, making the helper functions more generally useful, moving code to kgb, and otherwise just simplifying the tests.
d03c13a4fb807c8162d5fcfbafd2c0baf1e501ba
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (4e9f98b)
Loading...