aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/interop/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_tests/tests/interop/client.py')
-rw-r--r--src/python/grpcio_tests/tests/interop/client.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/python/grpcio_tests/tests/interop/client.py b/src/python/grpcio_tests/tests/interop/client.py
index 698c37017f..56cb29477c 100644
--- a/src/python/grpcio_tests/tests/interop/client.py
+++ b/src/python/grpcio_tests/tests/interop/client.py
@@ -54,7 +54,6 @@ def _args():
help='replace platform root CAs with ca.pem')
parser.add_argument(
'--server_host_override',
- default="foo.test.google.fr",
type=str,
help='the server host to which to claim to connect')
parser.add_argument(
@@ -100,10 +99,13 @@ def _stub(args):
channel_credentials = grpc.composite_channel_credentials(
channel_credentials, call_credentials)
- channel = grpc.secure_channel(target, channel_credentials, ((
- 'grpc.ssl_target_name_override',
- args.server_host_override,
- ),))
+ channel_opts = None
+ if args.server_host_override:
+ channel_opts = ((
+ 'grpc.ssl_target_name_override',
+ args.server_host_override,
+ ),)
+ channel = grpc.secure_channel(target, channel_credentials, channel_opts)
else:
channel = grpc.insecure_channel(target)
if args.test_case == "unimplemented_service":