Skip to content

Commit

Permalink
stub server v2: set target from listener (#100)
Browse files Browse the repository at this point in the history
Instead of the unspecified IP address use the Addr() from Listener to set the
value of target.

Signed-off-by: Florian Lehner <[email protected]>
  • Loading branch information
florianl authored Feb 20, 2024
1 parent 17d2b25 commit 28d7d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/client/mock/stub_serverV2.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (s *StubServerV2) listen(opt ...grpc.ServerOption) (lis net.Listener, clean
return nil, nil, err
}
s.Port = lis.Addr().(*net.TCPAddr).Port
s.target = fmt.Sprintf(":%d", s.Port)
s.target = lis.Addr().String()
return lis, cleanup, nil
}

Expand Down

0 comments on commit 28d7d95

Please sign in to comment.