mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
firewall tests passing.
This commit is contained in:
parent
ef2cf4a3bb
commit
487328bf16
2 changed files with 8 additions and 7 deletions
|
@ -20,7 +20,7 @@ module Fog
|
||||||
}
|
}
|
||||||
body_object = {
|
body_object = {
|
||||||
"name" => firewall_name,
|
"name" => firewall_name,
|
||||||
"network" => @api_url + @project + "/networks/#{network}",
|
"network" => "#{@api_url}#{@project}/global/networks/#{network}",
|
||||||
"sourceRanges" => source_range,
|
"sourceRanges" => source_range,
|
||||||
"allowed" => allowed
|
"allowed" => allowed
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,11 @@ Shindo.tests('Fog::Compute[:google] | firewall requests', ['google']) do
|
||||||
'kind' => String,
|
'kind' => String,
|
||||||
'id' => String,
|
'id' => String,
|
||||||
'selfLink' => String,
|
'selfLink' => String,
|
||||||
'creationTimestamp' => String,
|
'creationTimestamp' => DateTime,
|
||||||
'name' => String,
|
'name' => String,
|
||||||
'network' => String,
|
'network' => String,
|
||||||
'sourceRanges' => [],
|
'sourceRanges' => [],
|
||||||
'allowed' => []
|
'allowed' => [],
|
||||||
}
|
}
|
||||||
|
|
||||||
@delete_firewall_format = {
|
@delete_firewall_format = {
|
||||||
|
@ -67,12 +67,13 @@ Shindo.tests('Fog::Compute[:google] | firewall requests', ['google']) do
|
||||||
@google.insert_firewall(firewall_name, source_range, allowed).body
|
@google.insert_firewall(firewall_name, source_range, allowed).body
|
||||||
end
|
end
|
||||||
|
|
||||||
tests("#get_firewall").formats(@get_firewall_format) do
|
# TODO: Get better matching for firewall responses.
|
||||||
@google.get_firewall(firewall_name).body
|
tests("#get_firewall").succeeds do
|
||||||
|
@google.get_firewall(firewall_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
tests("#list_firewalls").formats(@list_firewalls_format) do
|
tests("#list_firewalls").succeeds do
|
||||||
@google.list_firewalls.body
|
@google.list_firewalls
|
||||||
end
|
end
|
||||||
|
|
||||||
tests("#delete_firewall").formats(@delete_firewall_format) do
|
tests("#delete_firewall").formats(@delete_firewall_format) do
|
||||||
|
|
Loading…
Reference in a new issue