Skip to content

Commit a508b0e

Browse files
committed
chore: pkg imported more than once
1 parent a38752d commit a508b0e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/proxy_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import (
3939
"google.golang.org/grpc/metadata"
4040
"k8s.io/apimachinery/pkg/util/wait"
4141
"sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client"
42-
"sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
4342
metricsclient "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics"
4443
clientmetricstest "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics/testing"
4544
clientproto "sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client"
@@ -360,7 +359,7 @@ func TestProxyDial_RequestCancelled_GRPC(t *testing.T) {
360359
}
361360
}()
362361

363-
if err := clientmetricstest.ExpectClientDialFailure(metrics.DialFailureContext, 1); err != nil {
362+
if err := clientmetricstest.ExpectClientDialFailure(metricsclient.DialFailureContext, 1); err != nil {
364363
t.Error(err)
365364
}
366365
if err := metricstest.ExpectServerDialFailure(metricsserver.DialFailureFrontendClose, 1); err != nil {
@@ -485,7 +484,7 @@ func TestProxyDial_AgentTimeout_GRPC(t *testing.T) {
485484
t.Errorf("Unexpected error: %v", err)
486485
}
487486

488-
if err := clientmetricstest.ExpectClientDialFailure(metrics.DialFailureEndpoint, 1); err != nil {
487+
if err := clientmetricstest.ExpectClientDialFailure(metricsclient.DialFailureEndpoint, 1); err != nil {
489488
t.Error(err)
490489
}
491490
if err := metricstest.ExpectServerDialFailure(metricsserver.DialFailureErrorResponse, 1); err != nil {

tests/reconnect_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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

3332
func 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

9190
type 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
}

0 commit comments

Comments
 (0)