Skip to content

Commit

Permalink
renaming streamingcalls
Browse files Browse the repository at this point in the history
  • Loading branch information
janardhankrishna-sai committed Dec 18, 2024
1 parent fa74a99 commit 1e7a099
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions authz/grpc_authz_end2end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (s) TestStaticPolicyEnd2End(t *testing.T) {
UnaryCallF: func(ctx context.Context, req *testpb.SimpleRequest) (*testpb.SimpleResponse, error) {
return &testpb.SimpleResponse{}, nil
},
StreamingInputCallF: func(stream testgrpc.TestService_StreamingInputCallServer) error {
ClientStreamingInputCall: func(stream testgrpc.TestService_StreamingInputCallServer) error {
for {
_, err := stream.Recv()
if err == io.EOF {
Expand Down Expand Up @@ -527,7 +527,7 @@ func (s) TestFileWatcherEnd2End(t *testing.T) {
UnaryCallF: func(ctx context.Context, req *testpb.SimpleRequest) (*testpb.SimpleResponse, error) {
return &testpb.SimpleResponse{}, nil
},
StreamingInputCallF: func(stream testgrpc.TestService_StreamingInputCallServer) error {
ClientStreamingInputCall: func(stream testgrpc.TestService_StreamingInputCallServer) error {
for {
_, err := stream.Recv()
if err == io.EOF {
Expand Down
14 changes: 7 additions & 7 deletions internal/stubserver/stubserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ type StubServer struct {
testgrpc.TestServiceServer

// Customizable implementations of server handlers.
EmptyCallF func(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error)
UnaryCallF func(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error)
FullDuplexCallF func(stream testgrpc.TestService_FullDuplexCallServer) error
StreamingInputCallF func(stream testgrpc.TestService_StreamingInputCallServer) error
StreamingOutputCallF func(req *testpb.StreamingOutputCallRequest, stream testgrpc.TestService_StreamingOutputCallServer) error
EmptyCallF func(ctx context.Context, in *testpb.Empty) (*testpb.Empty, error)
UnaryCallF func(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error)
FullDuplexCallF func(stream testgrpc.TestService_FullDuplexCallServer) error
ClientStreamingInputCall func(stream testgrpc.TestService_StreamingInputCallServer) error
ClientStreamingOutputCall func(req *testpb.StreamingOutputCallRequest, stream testgrpc.TestService_StreamingOutputCallServer) error

// A client connected to this service the test may use. Created in Start().
Client testgrpc.TestServiceClient
Expand Down Expand Up @@ -105,12 +105,12 @@ func (ss *StubServer) FullDuplexCall(stream testgrpc.TestService_FullDuplexCallS

// StreamingInputCall is the handler for testpb.StreamingInputCall
func (ss *StubServer) StreamingInputCall(stream testgrpc.TestService_StreamingInputCallServer) error {
return ss.StreamingInputCallF(stream)
return ss.ClientStreamingInputCall(stream)
}

// StreamingOutputCall is the handler for testpb.StreamingOutputCall
func (ss *StubServer) StreamingOutputCall(req *testpb.StreamingOutputCallRequest, stream testgrpc.TestService_StreamingOutputCallServer) error {
return ss.StreamingOutputCallF(req, stream)
return ss.ClientStreamingOutputCall(req, stream)

Check warning on line 113 in internal/stubserver/stubserver.go

View check run for this annotation

Codecov / codecov/patch

internal/stubserver/stubserver.go#L112-L113

Added lines #L112 - L113 were not covered by tests
}

// Start starts the server and creates a client connected to it.
Expand Down

0 comments on commit 1e7a099

Please sign in to comment.