mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
cleanup: modify deprecated field (#2380)
This commit is contained in:
parent
9737a3c5e4
commit
080165f2ee
@ -2,6 +2,7 @@ package discovery
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"net/url"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -74,8 +75,10 @@ func TestBuilder_Build(t *testing.T) {
|
|||||||
b := NewBuilder(&mockDiscovery{}, DisableDebugLog())
|
b := NewBuilder(&mockDiscovery{}, DisableDebugLog())
|
||||||
_, err := b.Build(
|
_, err := b.Build(
|
||||||
resolver.Target{
|
resolver.Target{
|
||||||
Scheme: resolver.GetDefaultScheme(),
|
URL: url.URL{
|
||||||
Endpoint: "gprc://authority/endpoint",
|
Scheme: resolver.GetDefaultScheme(),
|
||||||
|
Path: "grpc://authority/endpoint",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&mockConn{},
|
&mockConn{},
|
||||||
resolver.BuildOptions{},
|
resolver.BuildOptions{},
|
||||||
@ -87,8 +90,10 @@ func TestBuilder_Build(t *testing.T) {
|
|||||||
timeoutBuilder := NewBuilder(&mockDiscovery{}, WithTimeout(0))
|
timeoutBuilder := NewBuilder(&mockDiscovery{}, WithTimeout(0))
|
||||||
_, err = timeoutBuilder.Build(
|
_, err = timeoutBuilder.Build(
|
||||||
resolver.Target{
|
resolver.Target{
|
||||||
Scheme: resolver.GetDefaultScheme(),
|
URL: url.URL{
|
||||||
Endpoint: "gprc://authority/endpoint",
|
Scheme: resolver.GetDefaultScheme(),
|
||||||
|
Path: "grpc://authority/endpoint",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
&mockConn{},
|
&mockConn{},
|
||||||
resolver.BuildOptions{},
|
resolver.BuildOptions{},
|
||||||
|
Loading…
Reference in New Issue
Block a user