You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
"github.com/zeromicro/go-zero/internal/devserver"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestServiceConf(t *testing.T) {
|
|
|
|
c := ServiceConf{
|
|
|
|
Name: "foo",
|
|
|
|
Log: logx.LogConf{
|
|
|
|
Mode: "console",
|
|
|
|
},
|
|
|
|
Mode: "dev",
|
|
|
|
DevServer: devserver.Config{
|
|
|
|
Port: 6470,
|
|
|
|
HealthPath: "/healthz",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
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())
|
|
|
|
}
|