accept --use_tls=true and --use_test_ca=true in ruby

pull/3861/head
Jan Tattermusch 9 years ago
parent 5e75116b9f
commit 73b3eea149
  1. 9
      src/ruby/pb/test/client.rb
  2. 5
      src/ruby/pb/test/server.rb
  3. 6
      tools/run_tests/run_interop_tests.py

@ -424,12 +424,13 @@ def parse_args
test_case_list = test_cases.join(',') test_case_list = test_cases.join(',')
opts.on('--test_case CODE', test_cases, {}, 'select a test_case', opts.on('--test_case CODE', test_cases, {}, 'select a test_case',
" (#{test_case_list})") { |v| args['test_case'] = v } " (#{test_case_list})") { |v| args['test_case'] = v }
opts.on('-s', '--use_tls', 'require a secure connection?') do |v| opts.on('--use_tls USE_TLS', ['false', 'true'],
args['secure'] = v 'require a secure connection?') do |v|
args['secure'] = v == 'true'
end end
opts.on('-t', '--use_test_ca', opts.on('--use_test_ca USE_TEST_CA', ['false', 'true'],
'if secure, use the test certificate?') do |v| 'if secure, use the test certificate?') do |v|
args['use_test_ca'] = v args['use_test_ca'] = v == 'true'
end end
end.parse! end.parse!
_check_args(args) _check_args(args)

@ -168,8 +168,9 @@ def parse_options
opts.on('--port PORT', 'server port') do |v| opts.on('--port PORT', 'server port') do |v|
options['port'] = v options['port'] = v
end end
opts.on('-s', '--use_tls', 'require a secure connection?') do |v| opts.on('--use_tls USE_TLS', ['false', 'true'],
options['secure'] = v 'require a secure connection?') do |v|
options['secure'] = v == 'true'
end end
end.parse! end.parse!

@ -249,17 +249,17 @@ class RubyLanguage:
def cloud_to_prod_args(self): def cloud_to_prod_args(self):
return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS +
['--use_tls']) ['--use_tls=true'])
def cloud_to_cloud_args(self): def cloud_to_cloud_args(self):
return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS + return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS +
['--use_tls', '--use_test_ca']) ['--use_tls=true', '--use_test_ca=true'])
def cloud_to_prod_env(self): def cloud_to_prod_env(self):
return _SSL_CERT_ENV return _SSL_CERT_ENV
def server_args(self): def server_args(self):
return ['ruby', 'src/ruby/bin/interop/interop_server.rb', '--use_tls'] return ['ruby', 'src/ruby/bin/interop/interop_server.rb', '--use_tls=true']
def global_env(self): def global_env(self):
return {} return {}

Loading…
Cancel
Save