Skip to content

Commit

Permalink
Fix happy path / malformed body
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jun 15, 2016
1 parent 48fcdf9 commit f16ea90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crossdock/client/errorstchout/behavior.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ func Run(t crossdock.T) {
validate: func(res3 []byte, isAppErr bool, err error) {
assert.NoError(err, "is not error")
assert.False(isAppErr, "malformed body must not be application error")
},
},
{
name: "malformed body",
procedure: "echo",
body: []byte(""),
headers: []byte("{}"),
validate: func(res3 []byte, isAppErr bool, err error) {
assert.Error(err, "is error")
assert.False(isAppErr, "malformed body must not be application error")
err, ok := err.(tchannel.SystemError)
assert.True(ok, "malformed body must produce system error")
if !ok {
Expand Down

0 comments on commit f16ea90

Please sign in to comment.