aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-12-06 13:42:27 +0100
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-12-20 14:49:54 +0100
commitb904fdaa40f74498dcc5a6c6c75612599b79d7c6 (patch)
tree2222cb4cbafbf5b6fe0c055ab02609bb3e50c3b7 /src
parentb4d4f2c46736294ed6ed2790074ceb92ceb29dd1 (diff)
do not use server override in ruby interop client by default
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ruby/pb/test/client.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb
index b2303c6e14..03f3d9001a 100755
--- a/src/ruby/pb/test/client.rb
+++ b/src/ruby/pb/test/client.rb
@@ -111,10 +111,13 @@ def create_stub(opts)
if opts.secure
creds = ssl_creds(opts.use_test_ca)
stub_opts = {
- channel_args: {
- GRPC::Core::Channel::SSL_TARGET => opts.server_host_override
- }
+ channel_args: {}
}
+ unless opts.server_host_override.empty?
+ stub_opts[:channel_args].merge!({
+ GRPC::Core::Channel::SSL_TARGET => opts.server_host_override
+ })
+ end
# Add service account creds if specified
wants_creds = %w(all compute_engine_creds service_account_creds)
@@ -603,7 +606,7 @@ class NamedTests
if not op.metadata.has_key?(initial_metadata_key)
fail AssertionError, "Expected initial metadata. None received"
elsif op.metadata[initial_metadata_key] != metadata[initial_metadata_key]
- fail AssertionError,
+ fail AssertionError,
"Expected initial metadata: #{metadata[initial_metadata_key]}. "\
"Received: #{op.metadata[initial_metadata_key]}"
end
@@ -611,7 +614,7 @@ class NamedTests
fail AssertionError, "Expected trailing metadata. None received"
elsif op.trailing_metadata[trailing_metadata_key] !=
metadata[trailing_metadata_key]
- fail AssertionError,
+ fail AssertionError,
"Expected trailing metadata: #{metadata[trailing_metadata_key]}. "\
"Received: #{op.trailing_metadata[trailing_metadata_key]}"
end
@@ -639,7 +642,7 @@ class NamedTests
fail AssertionError, "Expected trailing metadata. None received"
elsif duplex_op.trailing_metadata[trailing_metadata_key] !=
metadata[trailing_metadata_key]
- fail AssertionError,
+ fail AssertionError,
"Expected trailing metadata: #{metadata[trailing_metadata_key]}. "\
"Received: #{duplex_op.trailing_metadata[trailing_metadata_key]}"
end
@@ -710,7 +713,7 @@ Args = Struct.new(:default_service_account, :server_host, :server_host_override,
# validates the command line options, returning them as a Hash.
def parse_args
args = Args.new
- args.server_host_override = 'foo.test.google.fr'
+ args.server_host_override = ''
OptionParser.new do |opts|
opts.on('--oauth_scope scope',
'Scope for OAuth tokens') { |v| args['oauth_scope'] = v }