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 @@ -38,7 +38,6 @@ import (
38
38
"google.golang.org/grpc/metadata"
39
39
"k8s.io/apimachinery/pkg/util/wait"
40
40
"sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client"
41
- "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
42
41
metricsclient "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
43
42
clientmetricstest "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics/testing"
44
43
clientproto "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client"
@@ -359,7 +358,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) {
359
358
}
360
359
}()
361
360
362
- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureContext , 1 ); err != nil {
361
+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureContext , 1 ); err != nil {
363
362
t .Error (err )
364
363
}
365
364
if err := metricstest .ExpectServerDialFailure (metricsserver .DialFailureFrontendClose , 1 ); err != nil {
@@ -484,7 +483,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) {
484
483
t .Errorf ("Unexpected error: %v" , err )
485
484
}
486
485
487
- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureEndpoint , 1 ); err != nil {
486
+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureEndpoint , 1 ); err != nil {
488
487
t .Error (err )
489
488
}
490
489
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