Return the error on failed specializations with fn test --debug (#917)

This commit is contained in:
smruthi2187
2018-10-19 11:17:58 -07:00
committed by GitHub
parent 5aeba59b75
commit dd35750482
10 changed files with 47 additions and 7 deletions
+5 -1
View File
@@ -52,10 +52,11 @@ type HTTPTriggerSet struct {
recorderSet *RecorderSet
updateRouterRequestChannel chan struct{}
tsRoundTripperParams *tsRoundTripperParams
isDebugEnv bool
}
func makeHTTPTriggerSet(fmap *functionServiceMap, frmap *functionRecorderMap, trmap *triggerRecorderMap, fissionClient *crd.FissionClient,
kubeClient *kubernetes.Clientset, executor *executorClient.Client, crdClient *rest.RESTClient, params *tsRoundTripperParams) (*HTTPTriggerSet, k8sCache.Store, k8sCache.Store) {
kubeClient *kubernetes.Clientset, executor *executorClient.Client, crdClient *rest.RESTClient, params *tsRoundTripperParams, isDebugEnv bool) (*HTTPTriggerSet, k8sCache.Store, k8sCache.Store) {
httpTriggerSet := &HTTPTriggerSet{
functionServiceMap: fmap,
triggers: []crd.HTTPTrigger{},
@@ -65,6 +66,7 @@ func makeHTTPTriggerSet(fmap *functionServiceMap, frmap *functionRecorderMap, tr
crdClient: crdClient,
updateRouterRequestChannel: make(chan struct{}),
tsRoundTripperParams: params,
isDebugEnv: isDebugEnv,
}
var tStore, fnStore, rStore k8sCache.Store
var tController, fnController k8sCache.Controller
@@ -150,6 +152,7 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
fnWeightDistributionList: rr.functionWtDistributionList,
tsRoundTripperParams: ts.tsRoundTripperParams,
recorderName: recorderName,
isDebugEnv: ts.isDebugEnv,
}
if rr.resolveResultType == resolveResultSingleFunction {
@@ -197,6 +200,7 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
executor: ts.executor,
tsRoundTripperParams: ts.tsRoundTripperParams,
recorderName: recorderName,
isDebugEnv: ts.isDebugEnv,
}
muxRouter.HandleFunc(fission.UrlForFunction(function.Metadata.Name, function.Metadata.Namespace), fh.handler)
}