File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ import (
39
39
"google.golang.org/grpc/metadata"
40
40
"k8s.io/apimachinery/pkg/util/wait"
41
41
"sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client"
42
- "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
43
42
metricsclient "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
44
43
clientmetricstest "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics/testing"
45
44
clientproto "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client"
@@ -360,7 +359,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) {
360
359
}
361
360
}()
362
361
363
- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureContext , 1 ); err != nil {
362
+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureContext , 1 ); err != nil {
364
363
t .Error (err )
365
364
}
366
365
if err := metricstest .ExpectServerDialFailure (metricsserver .DialFailureFrontendClose , 1 ); err != nil {
@@ -485,7 +484,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) {
485
484
t .Errorf ("Unexpected error: %v" , err )
486
485
}
487
486
488
- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureEndpoint , 1 ); err != nil {
487
+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureEndpoint , 1 ); err != nil {
489
488
t .Error (err )
490
489
}
491
490
if err := metricstest .ExpectServerDialFailure (metricsserver .DialFailureErrorResponse , 1 ); err != nil {
Original file line number Diff line number Diff line change @@ -25,15 +25,14 @@ import (
25
25
"google.golang.org/grpc"
26
26
"google.golang.org/grpc/metadata"
27
27
"k8s.io/apimachinery/pkg/util/wait"
28
- "sigs.k8s.io/apiserver-network-proxy/proto/agent"
29
28
agentproto "sigs.k8s.io/apiserver-network-proxy/proto/agent"
30
29
"sigs.k8s.io/apiserver-network-proxy/proto/header"
31
30
)
32
31
33
32
func TestClientReconnects (t * testing.T ) {
34
33
connections := make (chan struct {})
35
34
s := & testAgentServerImpl {
36
- onConnect : func (stream agent .AgentService_ConnectServer ) error {
35
+ onConnect : func (stream agentproto .AgentService_ConnectServer ) error {
37
36
stream .SetHeader (metadata .New (map [string ]string {
38
37
header .ServerID : uuid .Must (uuid .NewRandom ()).String (),
39
38
header .ServerCount : "1" ,
@@ -89,9 +88,9 @@ func TestClientReconnects(t *testing.T) {
89
88
}
90
89
91
90
type testAgentServerImpl struct {
92
- onConnect func (agent .AgentService_ConnectServer ) error
91
+ onConnect func (agentproto .AgentService_ConnectServer ) error
93
92
}
94
93
95
- func (t * testAgentServerImpl ) Connect (svr agent .AgentService_ConnectServer ) error {
94
+ func (t * testAgentServerImpl ) Connect (svr agentproto .AgentService_ConnectServer ) error {
96
95
return t .onConnect (svr )
97
96
}
You can’t perform that action at this time.
0 commit comments