aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/pb/test
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-10-15 17:52:06 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-10-15 18:37:12 -0700
commit73b3eea149c9ad96985e056fe4cd692298734084 (patch)
treedc2882998a323b7fc39a9d0f7f08a6d632062c74 /src/ruby/pb/test
parent5e75116b9f8e0c60e3a3705aac132ee5fd2ac491 (diff)
accept --use_tls=true and --use_test_ca=true in ruby
Diffstat (limited to 'src/ruby/pb/test')
-rwxr-xr-xsrc/ruby/pb/test/client.rb9
-rwxr-xr-xsrc/ruby/pb/test/server.rb5
2 files changed, 8 insertions, 6 deletions
diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb
index 164e304b4d..e6d5223272 100755
--- a/src/ruby/pb/test/client.rb
+++ b/src/ruby/pb/test/client.rb
@@ -424,12 +424,13 @@ def parse_args
test_case_list = test_cases.join(',')
opts.on('--test_case CODE', test_cases, {}, 'select a test_case',
" (#{test_case_list})") { |v| args['test_case'] = v }
- opts.on('-s', '--use_tls', 'require a secure connection?') do |v|
- args['secure'] = v
+ opts.on('--use_tls USE_TLS', ['false', 'true'],
+ 'require a secure connection?') do |v|
+ args['secure'] = v == 'true'
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|
- args['use_test_ca'] = v
+ args['use_test_ca'] = v == 'true'
end
end.parse!
_check_args(args)
diff --git a/src/ruby/pb/test/server.rb b/src/ruby/pb/test/server.rb
index 32934f70ad..25c1b1e9e6 100755
--- a/src/ruby/pb/test/server.rb
+++ b/src/ruby/pb/test/server.rb
@@ -168,8 +168,9 @@ def parse_options
opts.on('--port PORT', 'server port') do |v|
options['port'] = v
end
- opts.on('-s', '--use_tls', 'require a secure connection?') do |v|
- options['secure'] = v
+ opts.on('--use_tls USE_TLS', ['false', 'true'],
+ 'require a secure connection?') do |v|
+ options['secure'] = v == 'true'
end
end.parse!