diff options
Diffstat (limited to 'src/ruby/qps/qps-common.rb')
-rw-r--r-- | src/ruby/qps/qps-common.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ruby/qps/qps-common.rb b/src/ruby/qps/qps-common.rb index 82c24d42b9..4119d600b1 100644 --- a/src/ruby/qps/qps-common.rb +++ b/src/ruby/qps/qps-common.rb @@ -44,6 +44,14 @@ def nulls(l) [].pack('x' * l).force_encoding('ascii-8bit') end +# load the test-only certificates +def load_test_certs + this_dir = File.expand_path(File.dirname(__FILE__)) + data_dir = File.join(File.dirname(this_dir), 'spec/testdata') + files = ['ca.pem', 'server1.key', 'server1.pem'] + files.map { |f| File.open(File.join(data_dir, f)).read } +end + # A EnumeratorQueue wraps a Queue yielding the items added to it via each_item. class EnumeratorQueue extend Forwardable |