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
+3 -1
View File
@@ -756,7 +756,9 @@ func fnTest(c *cli.Context) error {
functionUrl.RawQuery = query.Encode()
}
resp := httpRequest(c.String("method"), functionUrl.String(), c.String("body"), c.StringSlice("header"))
headers := c.StringSlice("header")
resp := httpRequest(c.String("method"), functionUrl.String(), c.String("body"), headers)
if resp.StatusCode < 400 {
body, err := ioutil.ReadAll(resp.Body)
util.CheckErr(err, "Function test")