Browse Source

chore: to correct comment and func name

topic
liulei 5 years ago
parent
commit
1b44b6f77e
  1. 1
      dtmsvr/config/config.go
  2. 2
      dtmsvr/config/config_utils.go
  3. 1
      go.mod
  4. 1
      go.sum
  5. 2
      test/store_test.go

1
dtmsvr/config/config.go

@ -14,6 +14,7 @@ const (
Mysql = "mysql"
Redis = "redis"
BoltDb = "boltdb"
Postgres = "postgres"
)
// MicroService config type for micro service

2
dtmsvr/config/config_utils.go

@ -65,7 +65,7 @@ func checkConfig(conf *configType) error {
switch conf.Store.Driver {
case BoltDb:
return nil
case Mysql:
case Mysql, Postgres:
if conf.Store.Host == "" {
return errors.New("Db host not valid ")
}

1
go.mod

@ -17,6 +17,7 @@ require (
github.com/lithammer/shortuuid/v3 v3.0.7
github.com/onsi/gomega v1.16.0
github.com/prometheus/client_golang v1.11.0
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
go.etcd.io/bbolt v1.3.6
go.uber.org/atomic v1.9.0 // indirect

1
go.sum

@ -476,6 +476,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=

2
test/store_test.go

@ -92,7 +92,7 @@ func TestStoreWait(t *testing.T) {
registry.WaitStoreUp()
}
func TestUpdateBranchSql(t *testing.T) {
func TestUpdateBranches(t *testing.T) {
if !conf.Store.IsDB() {
_, err := registry.GetStore().UpdateBranches(nil, nil)
assert.Nil(t, err)

Loading…
Cancel
Save