fix: only setup logx once (#2188)
* fix: only setup logx once * fix: test failure * chore: not reset logging level in reset * chore: refactoring
This commit is contained in:
@@ -16,7 +16,6 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"github.com/zeromicro/go-zero/core/service"
|
||||
"github.com/zeromicro/go-zero/rest/chain"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"github.com/zeromicro/go-zero/rest/router"
|
||||
@@ -105,18 +104,6 @@ Port: 54321
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewServerError(t *testing.T) {
|
||||
_, err := NewServer(RestConf{
|
||||
ServiceConf: service.ServiceConf{
|
||||
Log: logx.LogConf{
|
||||
// file mode, no path specified
|
||||
Mode: "file",
|
||||
},
|
||||
},
|
||||
})
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
func TestWithMaxBytes(t *testing.T) {
|
||||
const maxBytes = 1000
|
||||
var fr featuredRoutes
|
||||
|
||||
Reference in New Issue
Block a user