Skip to content

Commit

Permalink
chore: fix test fail (#1669)
Browse files Browse the repository at this point in the history
* chore: fix test fail

* fix binduri test fail
  • Loading branch information
thinkerou authored Dec 4, 2018
1 parent 54e9610 commit f463d84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion binding/binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func TestUriBinding(t *testing.T) {
}
var not NotSupportStruct
assert.Error(t, b.BindUri(m, &not))
assert.Equal(t, "", not.Name)
assert.Equal(t, map[string]interface{}(nil), not.Name)
}

func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) {
Expand Down
5 changes: 3 additions & 2 deletions recovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net"
"net/http"
"os"
"strings"
"syscall"
"testing"

Expand Down Expand Up @@ -84,7 +85,7 @@ func TestPanicWithBrokenPipe(t *testing.T) {
const expectCode = 204

expectMsgs := map[syscall.Errno]string{
syscall.EPIPE: "Broken pipe",
syscall.EPIPE: "broken pipe",
syscall.ECONNRESET: "connection reset by peer",
}

Expand All @@ -108,7 +109,7 @@ func TestPanicWithBrokenPipe(t *testing.T) {
w := performRequest(router, "GET", "/recovery")
// TEST
assert.Equal(t, expectCode, w.Code)
assert.Contains(t, buf.String(), expectMsg)
assert.Contains(t, strings.ToLower(buf.String()), expectMsg)
})
}
}

0 comments on commit f463d84

Please sign in to comment.