Refactor routes test into setup/teardown phases
Review Request #10050 — Created June 29, 2018 and submitted
Since all the routes tests do the same common setup and tear down, they
have been refactored to call a method which returns all the common data
used in the tests (repositories, config instance, etc.) and a way to
tear it down.
We now also pass
config.Configobjects by their address since they
contain pointer types (specifically the
Repositoriesfield) to make it
clear that any function receiving them may modify them. Previously it
was possible to modify their pointer fields even if passed by value.
go fmt ./....