Skip to content

Commit

Permalink
Add integration test for source_dest_check
Browse files Browse the repository at this point in the history
  • Loading branch information
ljfranklin authored and Brian Cunnie committed Sep 2, 2016
1 parent 10fd76b commit 3c7cb07
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/bosh_aws_cpi/spec/integration/lifecycle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,32 @@
end
end

it 'sets source_dest_check to true by default' do
vm_lifecycle do |instance_id|
instance = cpi.ec2_client.instances[instance_id]

expect(instance.source_dest_check).to be(true)
end
end

context 'with source_dest_check disabled' do
let(:resource_pool) do
{
'instance_type' => instance_type,
'availability_zone' => @subnet_zone,
'source_dest_check' => false
}
end

it 'modifies the instance to disable source_dest_check' do
vm_lifecycle do |instance_id|
instance = cpi.ec2_client.instances[instance_id]

expect(instance.source_dest_check).to be(false)
end
end
end

context 'with security groups names' do
let(:security_groups) { get_security_group_names(@subnet_id) }

Expand Down

0 comments on commit 3c7cb07

Please sign in to comment.