feat: registry.
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
package consul
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
conf "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewConsulRegistry(t *testing.T) {
|
||||
var cfg conf.Registry
|
||||
cfg.Consul.Scheme = "http"
|
||||
cfg.Consul.Address = "localhost:8500"
|
||||
cfg.Consul.HealthCheck = false
|
||||
cfg := conf.Registry{
|
||||
Consul: &conf.Registry_Consul{
|
||||
Scheme: "http",
|
||||
Address: "localhost:8500",
|
||||
HealthCheck: false,
|
||||
},
|
||||
}
|
||||
|
||||
reg := NewRegistry(&cfg)
|
||||
assert.Nil(t, reg)
|
||||
assert.NotNil(t, reg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user