userver: /data/code/userver/libraries/grpc-reflection/functional_tests/golden_path/tests/test_grpc_reflection.py Source File
Loading...
Searching...
No Matches
test_grpc_reflection.py
1import logging
2
3from grpc_reflection.v1alpha.proto_reflection_descriptor_database import (
4 ServerReflectionRequest,
5)
6
7logger = logging.getLogger(__name__)
8
9
10async def test_happy_path(grpc_reflection_client):
11 request = ServerReflectionRequest(list_services='')
12 response = grpc_reflection_client.ServerReflectionInfo(iter([request]))
13 res = await response.read()
14 list_services = res.list_services_response
15 services = list_services.service
16 result = set([service.name for service in services])
17 reference = set([
18 'grpc.reflection.v1alpha.ServerReflection',
19 'grpc.health.v1.Health',
20 ])
21 assert result == reference