Move configuration into the config packge

Review Request #9771 — Created March 13, 2018 and submitted

brennie
rb-gateway
master
9767
9773
4f6b0c2...
rb-gateway

We now have a config.Config struct which contains all the data in the
configuration file. Unfortunately, we still need a global config since
the routes do not have access to state. The globalConfig variable and
config.Get{Field} methods will be removed in a future path, which will
clean up a lot of testing infrastructure to not require writing changes
to disk.

The cleanup involved updating all the tests in routes_tests.go, so I
removed the setup/tearddown methods, which are not very idiomatic for go
unit tests and since you cannot defer into a parent scope it make sense
to have the following pattern:

state := helpers.SetUp(t, ...)
defer helpers.TearDown(t, state)

for all the resources in a unit test.

Ran unit tests.

brennie
david
  1. Ship It!
  2. 
      
brennie
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (53ad0a7)
Loading...