Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Jan 4, 2024
1 parent f09af97 commit 120728c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,16 +359,15 @@ func createClientWithKeyspace(
ctx context.Context, keyspaceID uint32, svrAddrs []string,
security SecurityOption, opts ...ClientOption,
) (Client, error) {
pdTLSCfg := &tlsutil.TLSConfig{
tlsCfg, err := tlsutil.TLSConfig{
CAPath: security.CAPath,
CertPath: security.CertPath,
KeyPath: security.KeyPath,

SSLCABytes: security.SSLCABytes,
SSLCertBytes: security.SSLCertBytes,
SSLKEYBytes: security.SSLKEYBytes,
}
tlsCfg, err := pdTLSCfg.ToTLSConfig()
}.ToTLSConfig()
if err != nil {
return nil, err

Check warning on line 372 in client/client.go

View check run for this annotation

Codecov / codecov/patch

client/client.go#L372

Added line #L372 was not covered by tests
}
Expand Down Expand Up @@ -477,16 +476,15 @@ func newClientWithKeyspaceName(
ctx context.Context, keyspaceName string, svrAddrs []string,
security SecurityOption, opts ...ClientOption,
) (Client, error) {
pdTLSCfg := &tlsutil.TLSConfig{
tlsCfg, err := tlsutil.TLSConfig{
CAPath: security.CAPath,
CertPath: security.CertPath,
KeyPath: security.KeyPath,

SSLCABytes: security.SSLCABytes,
SSLCertBytes: security.SSLCertBytes,
SSLKEYBytes: security.SSLKEYBytes,
}
tlsCfg, err := pdTLSCfg.ToTLSConfig()
}.ToTLSConfig()
if err != nil {
return nil, err

Check warning on line 489 in client/client.go

View check run for this annotation

Codecov / codecov/patch

client/client.go#L489

Added line #L489 was not covered by tests
}
Expand Down

0 comments on commit 120728c

Please sign in to comment.