feat: add etcd resolver scheme, fix discov minor issue (#1281)

This commit is contained in:
Kevin Wan
2021-11-28 20:08:18 +08:00
committed by GitHub
parent 038491b7bc
commit d828c3f37e
5 changed files with 54 additions and 18 deletions

View File

@@ -34,9 +34,9 @@ func setMockClient(cli EtcdClient) func() {
func TestGetCluster(t *testing.T) {
AddAccount([]string{"first"}, "foo", "bar")
c1 := GetRegistry().getCluster([]string{"first"})
c2 := GetRegistry().getCluster([]string{"second"})
c3 := GetRegistry().getCluster([]string{"first"})
c1, _ := GetRegistry().getCluster([]string{"first"})
c2, _ := GetRegistry().getCluster([]string{"second"})
c3, _ := GetRegistry().getCluster([]string{"first"})
assert.Equal(t, c1, c3)
assert.NotEqual(t, c1, c2)
}