Refactor routes test into setup/teardown phases

Review Request #10050 — Created June 29, 2018 and submitted — Latest diff uploaded

Information

rb-gateway
master
9b5bb5b...

Reviewers

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.Config objects by their address since they
contain pointer types (specifically the Repositories field) 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.

Ran go fmt ./....
Ran make test.
Ran make integration-tests.

    Loading...