allow user configured agent in full node (#627)

* allow user configured agent in full node

this should keep the old default behavior but allow users to pass in a
configured agent to configure the server themselves, without having to worry
about a russian agent being a british agent.

also closes any agent given to an api node.

closes #623

* don't close agent in runner test
This commit is contained in:
Reed Allman
2017-12-26 11:04:14 -06:00
committed by GitHub
parent 3c686aac5c
commit 683fef8c2e
2 changed files with 10 additions and 4 deletions

View File

@@ -168,7 +168,7 @@ func TestRunnerNode(t *testing.T) {
// Add route with an API server using the same DB
{
apiServer := testServer(ds, &mqs.Mock{}, logDB, rnr, ServerTypeAPI)
apiServer := testServer(ds, &mqs.Mock{}, logDB, nil, ServerTypeAPI)
_, rec := routerRequest(t, apiServer.Router, "POST", "/v1/apps/myapp/routes", bytes.NewBuffer([]byte(`{ "route": { "name": "myroute", "path": "/myroute", "image": "fnproject/hello", "type": "sync" } }`)))
if rec.Code != http.StatusOK {
t.Errorf("Expected status code 200 when creating sync route, but got %d", rec.Code)