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...
struct  ServiceConfigs
 Options for ugrpc::tests::Service. Use designated initialization to construct. More...
class  ServiceFixture
class  ServiceFixtureBase
class  ServiceWithClientFixture
 Sets up a mini gRPC server and construct a client for it. More...
class  StandaloneClientFactory
 Sets up a mini gRPC client that is not directly associated with any userver gRPC server. More...

Typedefs

using SimpleClientMiddlewarePipeline
 RPC client middleware pipeline for tests.

Functions

server::Middlewares GetDefaultServerMiddlewares ()
 return list of default server middlewares for tests
client::Middlewares GetDefaultClientMiddlewares ()
 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.

Typedef Documentation

◆ SimpleClientMiddlewarePipeline

Initial value:
::middlewares::impl::SimpleMiddlewarePipeline<

RPC client middleware pipeline for tests.

Definition at line 15 of file simple_client_middleware_pipeline.hpp.

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.