-
Notifications
You must be signed in to change notification settings - Fork 98
Conversation
Codecov Report
@@ Coverage Diff @@
## master #405 +/- ##
==========================================
- Coverage 64.19% 63.85% -0.35%
==========================================
Files 29 29
Lines 1648 1649 +1
==========================================
- Hits 1058 1053 -5
- Misses 547 553 +6
Partials 43 43
Continue to review full report at Codecov.
|
.travis.yml
Outdated
@@ -12,7 +12,7 @@ install: | |||
script: | |||
- go get -u github.com/alecthomas/gometalinter | |||
- gometalinter --install --force | |||
- gometalinter --vendor --fast --disable=gotype --disable=vetshadow --disable=gas --skip=mock ./... | |||
- gometalinter --vendor --fast --cyclo-over 12 --disable=gotype --disable=vetshadow --disable=gas --skip=mock ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we don't need this change.
router/router_test.go
Outdated
@@ -116,7 +126,14 @@ func TestRouterServeHTTP_Encoding(t *testing.T) { | |||
} | |||
json.NewDecoder(r.Body).Decode(&testevent) | |||
|
|||
assert.Equal(t, test["expected"], testevent.Data.(map[string]interface{})["body"]) | |||
if strings.HasPrefix(test["content-type"], "application/json") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be like that. There are few issues in this test.
Test cases should not be defined as []map[string]string
it should be inline struct
[]struct {
requestBody string
contentType string
expectedPayload interface{}
}
thanks to that we can have string
or map[string]interface{}
as expectedPayload
. Then we don't need to change this line at all.
It looks a bit messy that we have those test cases defined inside the test function. Can you move it to the bottom of this file?
No description provided.