diff options
author | apolcyn <apolcyn@google.com> | 2018-09-26 21:24:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 21:24:59 -0700 |
commit | 2947946871452b2b49b0c657b43ee32158acfc79 (patch) | |
tree | e97858f620e6b0b8ed79051d86ac68dc10f45803 /src/ruby | |
parent | c3db7d21ce1dfbd6f25bde500af62fd1c197928f (diff) | |
parent | 520b2a0786494ff530b7a91d616c255a33e940a8 (diff) |
Merge pull request #15378 from ganmacs/fix-option-name
Change option name of client.rb
Diffstat (limited to 'src/ruby')
-rwxr-xr-x | src/ruby/pb/test/client.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index cfed7ca12a..7710d34657 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -95,7 +95,7 @@ end # creates a test stub that accesses host:port securely. def create_stub(opts) - address = "#{opts.host}:#{opts.port}" + address = "#{opts.server_host}:#{opts.server_port}" # Provide channel args that request compression by default # for compression interop tests @@ -703,8 +703,8 @@ class NamedTests end # Args is used to hold the command line info. -Args = Struct.new(:default_service_account, :host, :host_override, - :oauth_scope, :port, :secure, :test_case, +Args = Struct.new(:default_service_account, :server_host, :host_override, + :oauth_scope, :server_port, :secure, :test_case, :use_test_ca) # validates the command line options, returning them as a Hash. @@ -715,7 +715,7 @@ def parse_args opts.on('--oauth_scope scope', 'Scope for OAuth tokens') { |v| args['oauth_scope'] = v } opts.on('--server_host SERVER_HOST', 'server hostname') do |v| - args['host'] = v + args['server_host'] = v end opts.on('--default_service_account email_address', 'email address of the default service account') do |v| @@ -725,7 +725,9 @@ def parse_args 'override host via a HTTP header') do |v| args['host_override'] = v end - opts.on('--server_port SERVER_PORT', 'server port') { |v| args['port'] = v } + opts.on('--server_port SERVER_PORT', 'server port') do |v| + args['server_port'] = v + end # instance_methods(false) gives only the methods defined in that class test_cases = NamedTests.instance_methods(false).map(&:to_s) test_case_list = test_cases.join(',') @@ -744,7 +746,7 @@ def parse_args end def _check_args(args) - %w(host port test_case).each do |a| + %w(server_host server_port test_case).each do |a| if args[a].nil? fail(OptionParser::MissingArgument, "please specify --#{a}") end |