server: export ServerTransportStreamFromContext for unary interceptors to control headers/trailers (#2019)
This commit is contained in:
@ -128,7 +128,7 @@ func TestGetServiceInfo(t *testing.T) {
|
||||
func TestStreamContext(t *testing.T) {
|
||||
expectedStream := &transport.Stream{}
|
||||
ctx := NewContextWithServerTransportStream(context.Background(), expectedStream)
|
||||
s := serverTransportStreamFromContext(ctx)
|
||||
s := ServerTransportStreamFromContext(ctx)
|
||||
stream, ok := s.(*transport.Stream)
|
||||
if !ok || expectedStream != stream {
|
||||
t.Fatalf("GetStreamFromContext(%v) = %v, %t, want: %v, true", ctx, stream, ok, expectedStream)
|
||||
|
Reference in New Issue
Block a user