Skip to content
Permalink
Browse files

Add single port test

  • Loading branch information...
Genki Sugawara
Genki Sugawara committed Dec 3, 2015
1 parent 225e212 commit 887208155ee2f4081ec893a2558accb6b8f3a152
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/piculet_create_permission_spec.rb
@@ -24,7 +24,7 @@
end

[:ingress, :egress].each do |direction|
[[:tcp, 80..81], [:udp, 53..54], [:any, nil], [:icmp, -1..-1], [:"50", nil]].each do |protocol, port_range|
[[:tcp, 80..81], [:udp, 53..54], [:any, nil], [:icmp, -1..-1], [:"50", nil], [:tcp, 80]].each do |protocol, port_range|
context "add #{protocol} #{direction} permission allow from ip ranges" do #
it do
groupfile { (<<"EOS")
@@ -48,7 +48,7 @@
expected_permissions = [[
[:groups , EMPTY_ARRAY],
[:ip_ranges , ["0.0.0.0/0", "127.0.0.1/32"]],
[:port_range , port_range],
[:port_range , port_range.kind_of?(Integer) ? port_range..port_range : port_range],
[:protocol , protocol],
]]

@@ -107,7 +107,7 @@
[[:name, "default"] , [:owner_id, TEST_OWNER_ID]],
]],
[:ip_ranges , EMPTY_ARRAY],
[:port_range , port_range],
[:port_range , port_range.kind_of?(Integer) ? port_range..port_range : port_range],
[:protocol , protocol],
]]

@@ -190,7 +190,7 @@
[[:name, "default"] , [:owner_id, TEST_OWNER_ID]],
]],
[:ip_ranges , EMPTY_ARRAY],
[:port_range , port_range],
[:port_range , port_range.kind_of?(Integer) ? port_range..port_range : port_range],
[:protocol , protocol],
]]

@@ -260,7 +260,7 @@
[[:name, "default"] , [:owner_id, TEST_OWNER_ID]],
]],
[:ip_ranges , ["0.0.0.0/0", "127.0.0.1/32"]],
[:port_range , port_range],
[:port_range , port_range.kind_of?(Integer) ? port_range..port_range : port_range],
[:protocol , protocol],
]]

0 comments on commit 8872081

Please sign in to comment.
You can’t perform that action at this time.