Skip to content

Commit de1fbe5

Browse files
committed
Linked GRPC Service for system tests
1 parent 8e5ef5a commit de1fbe5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/nirfsg/system_tests/test_system_nirfsg.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os
66
import pathlib
77
import pytest
8+
import grpc
89
import sys
910
import time
1011

@@ -583,3 +584,18 @@ class TestLibrary(SystemTests):
583584
@pytest.fixture(scope='class')
584585
def session_creation_kwargs(self):
585586
return {}
587+
588+
589+
class TestGrpc(SystemTests):
590+
@pytest.fixture(scope='class')
591+
def grpc_channel(self):
592+
current_directory = os.path.dirname(os.path.abspath(__file__))
593+
config_file_path = os.path.join(current_directory, 'grpc_server_config.json')
594+
with system_test_utilities.GrpcServerProcess(config_file_path) as proc:
595+
channel = grpc.insecure_channel(f"localhost:{proc.server_port}")
596+
yield channel
597+
598+
@pytest.fixture(scope='class')
599+
def session_creation_kwargs(self, grpc_channel):
600+
grpc_options = nirfsg.GrpcSessionOptions(grpc_channel, '')
601+
return {'grpc_options': grpc_options}

0 commit comments

Comments
 (0)