aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'src/ruby')
-rwxr-xr-xsrc/ruby/pb/test/client.rb14
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