|
37 | 37 | from ansys.dpf import core |
38 | 38 | from ansys.dpf.core import examples |
39 | 39 | from ansys.dpf.core.check_version import get_server_version, meets_version |
40 | | -from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig |
| 40 | +from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig, GrpcMode |
41 | 41 | import ansys.dpf.core.server_types |
42 | 42 | from ansys.dpf.gate.load_api import _try_use_gatebin |
43 | 43 |
|
|
52 | 52 | running_docker = ansys.dpf.core.server_types.RUNNING_DOCKER.use_docker |
53 | 53 | local_test_repo = False |
54 | 54 |
|
| 55 | +DPF_DEFAULT_GRPC_MODE=os.environ.get("DPF_DEFAULT_GRPC_MODE", None) |
| 56 | + |
55 | 57 |
|
56 | 58 | def _get_test_files_directory(): |
57 | 59 | if local_test_repo is False: |
@@ -472,8 +474,8 @@ def server_type(request): |
472 | 474 | config_names_server_type_remote_process, |
473 | 475 | ) = remove_none_available_config( |
474 | 476 | [ |
475 | | - ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True), |
476 | | - ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False), |
| 477 | + ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True, grpc_mode=GrpcMode.Insecure if DPF_DEFAULT_GRPC_MODE == "insecure" else GrpcMode.mTLS), |
| 478 | + ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False,grpc_mode=GrpcMode.Insecure if DPF_DEFAULT_GRPC_MODE == "insecure" else GrpcMode.mTLS), |
477 | 479 | ], |
478 | 480 | ["ansys-grpc-dpf", "gRPC CLayer"], |
479 | 481 | ) |
|
0 commit comments