userver: pytest_userver.plugins.grpc.client Namespace Reference
Loading...
Searching...
No Matches
pytest_userver.plugins.grpc.client Namespace Reference

Detailed Description

Make gRPC requests to the service.

See also
gRPC client and service

Functions

int grpc_service_port_fallback ()
 Returns the gRPC port that should be used in service runner mode in case no port is specified in the source config_yaml.
 
str grpc_service_endpoint (service_config)
 Returns the gRPC endpoint of the service.
 
float grpc_service_timeout (pytestconfig)
 Returns the gRPC timeout for the service that is set by the command line option --service-timeout.
 
 grpc_session_channel (grpc_service_endpoint)
 
 grpc_channel (service_client, grpc_service_endpoint, grpc_service_timeout, grpc_session_channel, request)
 Returns the gRPC channel configured by the parameters from the grpc_service_endpoint fixture.
 
Generator[pathlib.Path, None, None] grpc_socket_path ()
 Path for the UNIX socket over which testsuite will talk to the gRPC service, if it chooses to use a UNIX socket.
 
 userver_config_grpc_endpoint (pytestconfig, grpc_service_port_fallback, substitute_config_vars, request, choose_free_port)
 Returns a function that adjusts the static config for testsuite.
 

Variables

float DEFAULT_TIMEOUT = 15.0
 
list USERVER_CONFIG_HOOKS = ['userver_config_grpc_endpoint']
 
TypeAlias _AsyncExcCheck = Callable[[], None]
 

Function Documentation

◆ grpc_session_channel()

pytest_userver.plugins.grpc.client.grpc_session_channel ( grpc_service_endpoint)

Definition at line 82 of file client.py.

Variable Documentation

◆ _AsyncExcCheck

TypeAlias pytest_userver.plugins.grpc.client._AsyncExcCheck = Callable[[], None]
protected

Definition at line 30 of file client.py.

◆ DEFAULT_TIMEOUT

float pytest_userver.plugins.grpc.client.DEFAULT_TIMEOUT = 15.0

Definition at line 27 of file client.py.

◆ USERVER_CONFIG_HOOKS

list pytest_userver.plugins.grpc.client.USERVER_CONFIG_HOOKS = ['userver_config_grpc_endpoint']

Definition at line 28 of file client.py.