chore: add more tests (#3014)

This commit is contained in:
Kevin Wan
2023-03-11 14:57:56 +08:00
committed by GitHub
parent 544aa7c432
commit f77e2c9cfa
6 changed files with 74 additions and 20 deletions

View File

@@ -26,8 +26,8 @@ func NewRpcPubServer(etcd discov.EtcdConf, listenOn string, middlewares ServerMi
pubOpts = append(pubOpts, discov.WithPubEtcdTLS(etcd.CertFile, etcd.CertKeyFile,
etcd.CACertFile, etcd.InsecureSkipVerify))
}
if etcd.HasServerID() {
pubOpts = append(pubOpts, discov.WithId(etcd.ServerID))
if etcd.HasID() {
pubOpts = append(pubOpts, discov.WithId(etcd.ID))
}
pubClient := discov.NewPublisher(etcd.Hosts, etcd.Key, pubListenOn, pubOpts...)
return pubClient.KeepAlive()