Skip to content

Commit

Permalink
bonsai
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Nov 24, 2024
1 parent d29bcdd commit 2744325
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions grpcstub.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ func (s *Server) ClearMatchers() {
s.matchers = nil
}

// Prepend prepend matcher.
func (s *Server) Prepend() *Server {
s.mu.Lock()
defer s.mu.Unlock()
Expand Down
2 changes: 2 additions & 0 deletions grpcstub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ func TestPrepend(t *testing.T) {
})
ts.Service("routeguide.RouteGuide").Response(map[string]any{"name": "hello"})
ts.Service("routeguide.RouteGuide").Response(map[string]any{"name": "world"})
ts.Service("routeguide.RouteGuide").Response(map[string]any{"name": "!!!"})

client := routeguide.NewRouteGuideClient(ts.Conn())
res, err := client.GetFeature(ctx, &routeguide.Point{
Expand All @@ -837,6 +838,7 @@ func TestPrepend(t *testing.T) {
})
ts.Service("routeguide.RouteGuide").Response(map[string]any{"name": "hello"})
ts.Prepend().Service("routeguide.RouteGuide").Response(map[string]any{"name": "world"})
ts.Service("routeguide.RouteGuide").Response(map[string]any{"name": "!!!"})

client := routeguide.NewRouteGuideClient(ts.Conn())
res, err := client.GetFeature(ctx, &routeguide.Point{
Expand Down

0 comments on commit 2744325

Please sign in to comment.