Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/issue 416 #546

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: using specific be_opened declaration
  • Loading branch information
glasswalk3r committed Aug 22, 2021
commit 5272f58b381e887b0e4215017e9afb9702f2178b
19 changes: 12 additions & 7 deletions spec/type/security_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,18 @@
it { should have_outbound_rule({ ip_protocol: 'tcp', from_port: 443, to_port: 443, prefix_list_id: 'pl-a5321fa3' }) }
end

# describe security_group('my-security-group-name') do
# it { should exist }
# its(:outbound) { should be_opened(50_000) }
# its(:inbound) { should be_opened(80) }
# it { should belong_to_vpc('my-vpc') }
# it { should have_tag('env').value('dev') }
# end
describe security_group('my-security-group-name') do
it { should exist }
its(:outbound) { should_not be_opened(50_000) }
its(:outbound) { should_not be_opened(50_000).protocol('tcp') }
its(:outbound) { should be_opened(50_000).protocol('tcp').target('100.45.67.12/32') }
its(:inbound) { should_not be_opened(80) }
its(:inbound) { should_not be_opened(80).protocol('tcp') }
its(:inbound) { should be_opened(80).protocol('tcp').for('123.45.67.0/24') }
its(:inbound) { should be_opened(80).protocol('tcp').for('123.45.68.89/32') }
it { should belong_to_vpc('my-vpc') }
it { should have_tag('env').value('dev') }
end
#
# describe security_group('my-security-tag-name') do
# its(:outbound) { should be_opened(50_000) }
Expand Down