test(e2e): add a case where client tls is missing for https metrics url
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
@ -822,7 +822,7 @@ func (e *Etcd) pickGRPCGatewayServeContext(splitHTTP bool) *serveCtx {
|
||||
panic("Expect at least one context able to serve grpc")
|
||||
}
|
||||
|
||||
var errMissingClientTLSInfoForMetricsURL = errors.New("client TLS key/cert (--cert-file, --key-file) must be provided for metrics url")
|
||||
var ErrMissingClientTLSInfoForMetricsURL = errors.New("client TLS key/cert (--cert-file, --key-file) must be provided for metrics url")
|
||||
|
||||
func (e *Etcd) createMetricsListener(murl url.URL) (net.Listener, error) {
|
||||
tlsInfo := &e.cfg.ClientTLSInfo
|
||||
@ -831,7 +831,7 @@ func (e *Etcd) createMetricsListener(murl url.URL) (net.Listener, error) {
|
||||
tlsInfo = nil
|
||||
case "https", "unixs":
|
||||
if e.cfg.ClientTLSInfo.Empty() {
|
||||
return nil, errMissingClientTLSInfoForMetricsURL
|
||||
return nil, ErrMissingClientTLSInfoForMetricsURL
|
||||
}
|
||||
}
|
||||
return transport.NewListenerWithOpts(murl.Host, murl.Scheme,
|
||||
|
Reference in New Issue
Block a user