Skip to content

Commit

Permalink
fix test on github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Jan 12, 2023
1 parent 0c2f747 commit 398a6f6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
go test -v -failfast -tags=test --race ./...
go test -v -tags=test --race ./...

bench:
go test -bench=.
Expand Down
2 changes: 1 addition & 1 deletion app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func TestGearAppOnError(t *testing.T) {
assert.Equal(`{"error":"InternalServerError","message":"Some error"}`, PickRes(res.Text()).(string))

log := buf.String()
assert.True(strings.Contains(log, "github.com/teambition/gear"))
assert.Contains(log, "gear")
res.Body.Close()
})

Expand Down
2 changes: 1 addition & 1 deletion middleware/static/static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func TestGearMiddlewareStaticWithIncludes(t *testing.T) {
res, err := RequestBy("GET", "http://"+srv.Addr().String()+"/README.md")
assert.Nil(err)
assert.Equal(200, res.StatusCode)
assert.Equal("text/plain; charset=utf-8", res.Header.Get(gear.HeaderContentType))
assert.Contains([]string{gear.MIMETextPlainCharsetUTF8, gear.MIMEMarkdownCharsetUTF8}, res.Header.Get(gear.HeaderContentType))
res.Body.Close()
})

Expand Down
4 changes: 2 additions & 2 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ func TestGearError(t *testing.T) {
assert.Equal(500, err.Code)
assert.Equal("Error", err.Err)
assert.Equal("error with stack", err.Msg)
assert.True(strings.Contains(err.Stack, "/util.go"))
assert.True(strings.Contains(err.Stack, "github.com/teambition/gear/util_test.go"))
assert.Contains(err.Stack, "/util.go")
assert.Contains(err.Stack, "/util_test.go")
})

t.Run("Error.From", func(t *testing.T) {
Expand Down

0 comments on commit 398a6f6

Please sign in to comment.