userver: ugrpc::tests Namespace Reference
Loading...
Searching...
No Matches
ugrpc::tests Namespace Reference

Detailed Description

userver gRPC testing facilities

Classes

class  Service
 Sets up a mini gRPC server using a single service implementation. More...
 
class  ServiceBase
 Sets up a mini gRPC server using the provided service implementations. More...
 
class  ServiceFixture
 
class  ServiceFixtureBase
 
class  StandaloneClientFactory
 Sets up a mini gRPC client that is not directly associated with any userver gRPC server. More...
 

Functions

server::Middlewares GetDefaultServerMiddlewares ()
 return list of default server middlewares for tests
 
client::MiddlewareFactories GetDefaultClientMiddlewareFactories ()
 return list of default client middleware factories for tests
 
std::uint16_t GetFreeIpv6Port ()
 
std::string MakeIpv6Endpoint (std::uint16_t port)
 Make an IPv6 localhost gRPC endpoint from port.
 

Function Documentation

◆ GetFreeIpv6Port()

std::uint16_t ugrpc::tests::GetFreeIpv6Port ( )

Acquire a free IPv6 port. Note: there is a small chance that a race could occur, and the port will be taken immediately after this function returns. Prefer spinning up a server with port auto-detection if possible.