Skip to content

Commit

Permalink
update nacos_test registry's name
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-Morgan committed Oct 22, 2024
1 parent 684ddf8 commit 36b591d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
6 changes: 3 additions & 3 deletions registry/nacos/nacoshertz/v2/nacos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func TestResolverResolve(t *testing.T) {
h := server.Default(
server.WithHostPorts("127.0.0.1:8080"),
server.WithRegistry(NewNacosRegistry(namingClient), &registry.Info{
ServiceName: "demo.hertz-contrib.local",
ServiceName: "demo.hertz-contrib.local.v2",
Addr: utils.NewNetAddr("tcp", "127.0.0.1:8080"),
Weight: 10,
}),
Expand Down Expand Up @@ -215,7 +215,7 @@ func TestResolverResolve(t *testing.T) {
name: "common",
args: args{
ctx: context.Background(),
desc: "demo.hertz-contrib.local",
desc: "demo.hertz-contrib.local.v2",
},
fields: fields{cli: namingClient},
},
Expand Down Expand Up @@ -246,7 +246,7 @@ func TestResolverResolve(t *testing.T) {
}

err := NewNacosRegistry(namingClient).Deregister(&registry.Info{
ServiceName: "demo.hertz-contrib.local",
ServiceName: "demo.hertz-contrib.local.v2",
Addr: utils.NewNetAddr("tcp", "127.0.0.1:8080"),
Weight: 10,
})
Expand Down
2 changes: 2 additions & 0 deletions registry/nacos/nacoskitex/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
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/smx-Morgan/cwgo-pkg/registry/nacos/options v0.0.0-20241022073704-d890c90bd175 h1:IspUo+wWieS7YAehC5URSDHPAcQiiTrjjDM0EcDAZLI=
github.com/smx-Morgan/cwgo-pkg/registry/nacos/options v0.0.0-20241022073704-d890c90bd175/go.mod h1:KwHwHQj6iF1QOLUzZNj+OvSjlZqa7oYKDXgL7M52fMo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
Expand Down
18 changes: 0 additions & 18 deletions registry/nacos/nacoskitex/v2/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ import (
"github.com/nacos-group/nacos-sdk-go/v2/vo"
)

/*type options struct {
cluster string
group string
}
// Option is nacos option.
type Option func(o *options)
// WithCluster with cluster option.
func WithCluster(cluster string) Option {
return func(o *options) { o.cluster = cluster }
}
// WithGroup with group option.
func WithGroup(group string) Option {
return func(o *options) { o.group = group }
}*/

type nacosRegistry struct {
cli naming_client.INamingClient
opts options.Options
Expand Down

0 comments on commit 36b591d

Please sign in to comment.