chore: add more tests (#2815)
* chore: add more tests * chore: add more tests * chore: add more tests * chore: add more tests * chore: add more tests * chore: add more tests
This commit is contained in:
@@ -3,6 +3,7 @@ package service
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
@@ -16,3 +17,15 @@ func TestServiceConf(t *testing.T) {
|
||||
}
|
||||
c.MustSetUp()
|
||||
}
|
||||
|
||||
func TestServiceConfWithMetricsUrl(t *testing.T) {
|
||||
c := ServiceConf{
|
||||
Name: "foo",
|
||||
Log: logx.LogConf{
|
||||
Mode: "volume",
|
||||
},
|
||||
Mode: "dev",
|
||||
MetricsUrl: "http://localhost:8080",
|
||||
}
|
||||
assert.NoError(t, c.SetUp())
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/zeromicro/go-zero/core/proc"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -55,6 +56,7 @@ func TestServiceGroup(t *testing.T) {
|
||||
}
|
||||
|
||||
group.Stop()
|
||||
proc.Shutdown()
|
||||
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user