summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-05-06 03:10:21 +0000
committerGerrit Code Review <review@openstack.org>2016-05-06 03:10:21 +0000
commitc61b21b5f0daf27e6fd9ffcf0125a52f081bdd46 (patch)
treefcc9feff728ca7c9478e1fab9fc04b9d466e5178 /spec
parent172412c0638107db538f1a491513de0836fdc311 (diff)
parent0bf0f72defc5260346717cf7c9d836342b34ebd6 (diff)
Merge "Add dport/sport parameter to firewall rule"
Diffstat (limited to 'spec')
-rw-r--r--spec/classes/tripleo_firewall_spec.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/classes/tripleo_firewall_spec.rb b/spec/classes/tripleo_firewall_spec.rb
index aa5d1d7..27ac62a 100644
--- a/spec/classes/tripleo_firewall_spec.rb
+++ b/spec/classes/tripleo_firewall_spec.rb
@@ -51,7 +51,7 @@ describe 'tripleo::firewall' do
:state => ['NEW'],
)
is_expected.to contain_firewall('003 accept ssh').with(
- :port => '22',
+ :dport => '22',
:proto => 'tcp',
:action => 'accept',
:state => ['NEW'],
@@ -74,7 +74,9 @@ describe 'tripleo::firewall' do
:firewall_rules => {
'300 add custom application 1' => {'port' => '999', 'proto' => 'udp', 'action' => 'accept'},
'301 add custom application 2' => {'port' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
- '302 fwd custom cidr 1' => {'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'}
+ '302 fwd custom cidr 1' => {'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'},
+ '303 add custom application 3' => {'dport' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
+ '304 add custom application 4' => {'sport' => '1000', 'proto' => 'tcp', 'action' => 'accept'}
}
)
end
@@ -95,6 +97,18 @@ describe 'tripleo::firewall' do
:chain => 'FORWARD',
:destination => '192.0.2.0/24',
)
+ is_expected.to contain_firewall('303 add custom application 3').with(
+ :dport => '8081',
+ :proto => 'tcp',
+ :action => 'accept',
+ :state => ['NEW'],
+ )
+ is_expected.to contain_firewall('304 add custom application 4').with(
+ :sport => '1000',
+ :proto => 'tcp',
+ :action => 'accept',
+ :state => ['NEW'],
+ )
end
end