Fix internal route setup bug (#335)

Fixes #334 which broke internal routes, and adds a test.
This commit is contained in:
Soam Vasani
2017-09-20 06:51:56 -07:00
committed by GitHub
parent e4a4ec4bff
commit c63a427ca3
2 changed files with 48 additions and 1 deletions
+2 -1
View File
@@ -115,9 +115,10 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
// Internal triggers for each function by name. Non-http
// triggers route into these.
for _, function := range ts.functions {
m := function.Metadata
fh := &functionHandler{
fmap: ts.functionServiceMap,
function: &function.Metadata,
function: &m,
poolmgr: ts.poolmgr,
}
muxRouter.HandleFunc(fission.UrlForFunction(function.Metadata.Name), fh.handler)