aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/spec/channel_spec.rb
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-12-16 13:04:37 -0800
committerGravatar murgatroid99 <mlumish@google.com>2015-12-16 13:04:37 -0800
commitafe3974bce8e46b9d137b5578e2addf2c459726f (patch)
tree7c8d51465c5899e366383284bcf99f9794a12de7 /src/ruby/spec/channel_spec.rb
parentda61668122b63fc18d64231dede700139234bc75 (diff)
Made insecure channel/stub explicit, in all layers
Diffstat (limited to 'src/ruby/spec/channel_spec.rb')
-rw-r--r--src/ruby/spec/channel_spec.rb21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/ruby/spec/channel_spec.rb b/src/ruby/spec/channel_spec.rb
index b4d2b94a81..355f95c9d7 100644
--- a/src/ruby/spec/channel_spec.rb
+++ b/src/ruby/spec/channel_spec.rb
@@ -45,7 +45,10 @@ describe GRPC::Core::Channel do
shared_examples '#new' do
it 'take a host name without channel args' do
- expect { GRPC::Core::Channel.new('dummy_host', nil) }.not_to raise_error
+ blk = proc do
+ GRPC::Core::Channel.new('dummy_host', nil, :this_channel_is_insecure)
+ end
+ expect(&blk).not_to raise_error
end
it 'does not take a hash with bad keys as channel args' do
@@ -106,13 +109,15 @@ describe GRPC::Core::Channel do
it_behaves_like '#new'
def construct_with_args(a)
- proc { GRPC::Core::Channel.new('dummy_host', a) }
+ proc do
+ GRPC::Core::Channel.new('dummy_host', a, :this_channel_is_insecure)
+ end
end
end
describe '#create_call' do
it 'creates a call OK' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
deadline = Time.now + 5
@@ -123,7 +128,7 @@ describe GRPC::Core::Channel do
end
it 'raises an error if called on a closed channel' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
ch.close
deadline = Time.now + 5
@@ -136,13 +141,13 @@ describe GRPC::Core::Channel do
describe '#destroy' do
it 'destroys a channel ok' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
blk = proc { ch.destroy }
expect(&blk).to_not raise_error
end
it 'can be called more than once without error' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
blk = proc { ch.destroy }
blk.call
expect(&blk).to_not raise_error
@@ -157,13 +162,13 @@ describe GRPC::Core::Channel do
describe '#close' do
it 'closes a channel ok' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
blk = proc { ch.close }
expect(&blk).to_not raise_error
end
it 'can be called more than once without error' do
- ch = GRPC::Core::Channel.new(fake_host, nil)
+ ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
blk = proc { ch.close }
blk.call
expect(&blk).to_not raise_error