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 (
3838 "google.golang.org/grpc/metadata"
3939 "k8s.io/apimachinery/pkg/util/wait"
4040 "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client"
41- "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
4241 metricsclient "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
4342 clientmetricstest "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics/testing"
4443 clientproto "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client"
@@ -359,7 +358,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) {
359358 }
360359 }()
361360
362- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureContext , 1 ); err != nil {
361+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureContext , 1 ); err != nil {
363362 t .Error (err )
364363 }
365364 if err := metricstest .ExpectServerDialFailure (metricsserver .DialFailureFrontendClose , 1 ); err != nil {
@@ -484,7 +483,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) {
484483 t .Errorf ("Unexpected error: %v" , err )
485484 }
486485
487- if err := clientmetricstest .ExpectClientDialFailure (metrics .DialFailureEndpoint , 1 ); err != nil {
486+ if err := clientmetricstest .ExpectClientDialFailure (metricsclient .DialFailureEndpoint , 1 ); err != nil {
488487 t .Error (err )
489488 }
490489 if err := metricstest .ExpectServerDialFailure (metricsserver .DialFailureErrorResponse , 1 ); err != nil {
Original file line number Diff line number Diff line change @@ -25,15 +25,14 @@ import (
2525 "google.golang.org/grpc"
2626 "google.golang.org/grpc/metadata"
2727 "k8s.io/apimachinery/pkg/util/wait"
28- "sigs.k8s.io/apiserver-network-proxy/proto/agent"
2928 agentproto "sigs.k8s.io/apiserver-network-proxy/proto/agent"
3029 "sigs.k8s.io/apiserver-network-proxy/proto/header"
3130)
3231
3332func TestClientReconnects (t * testing.T ) {
3433 connections := make (chan struct {})
3534 s := & testAgentServerImpl {
36- onConnect : func (stream agent .AgentService_ConnectServer ) error {
35+ onConnect : func (stream agentproto .AgentService_ConnectServer ) error {
3736 stream .SetHeader (metadata .New (map [string ]string {
3837 header .ServerID : uuid .Must (uuid .NewRandom ()).String (),
3938 header .ServerCount : "1" ,
@@ -89,9 +88,9 @@ func TestClientReconnects(t *testing.T) {
8988}
9089
9190type testAgentServerImpl struct {
92- onConnect func (agent .AgentService_ConnectServer ) error
91+ onConnect func (agentproto .AgentService_ConnectServer ) error
9392}
9493
95- func (t * testAgentServerImpl ) Connect (svr agent .AgentService_ConnectServer ) error {
94+ func (t * testAgentServerImpl ) Connect (svr agentproto .AgentService_ConnectServer ) error {
9695 return t .onConnect (svr )
9796}
You can’t perform that action at this time.
0 commit comments