support RpcClient Vertify With Unilateralism and Mutual (#647)

Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
workman-Lu
2021-10-30 22:07:15 +08:00
committed by GitHub
parent bef5bd4e4f
commit 9df6786b09
5 changed files with 69 additions and 2 deletions

View File

@@ -14,6 +14,11 @@ func TestRpcClientConf(t *testing.T) {
assert.True(t, conf.HasCredential())
conf = NewEtcdClientConf([]string{"localhost:1234", "localhost:5678"}, "key", "foo", "bar")
assert.True(t, conf.HasCredential())
// ssl on
conf = NewDirectClientConf([]string{"localhost:1234", "localhost:5678"}, "foo", "bar")
assert.False(t, conf.HasSslVerify())
conf.InsecureVerify = true
assert.True(t, conf.HasSslVerify())
}
func TestRpcServerConf(t *testing.T) {