1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

added limits unit test

This commit is contained in:
Mike Hagedorn 2013-03-06 12:34:52 -06:00 committed by Rupak Ganguly
parent 5801cc4520
commit df41397601
2 changed files with 31 additions and 0 deletions

View file

@ -16,6 +16,19 @@ module Fog
class Mock
def list_limits
response = Excon::Response.new
response.status = 200
response.body = {
"limits" => {
"absolute" => {
"values" => {
"maxLoadBalancerNameLength" => 128,
"maxLoadBalancers" => 20,
"maxNodesPerLoadBalancer" => 5,
"maxVIPsPerLoadBalancer" => 1
}
}
}
}
response
end

View file

@ -0,0 +1,18 @@
Shindo.tests("Fog::HP::LB | list limits", ['hp', 'lb', 'limits']) do
@limits_format = {
'maxLoadBalancerNameLength' => Integer,
'maxLoadBalancers' => Integer,
'maxNodesPerLoadBalancer' => Integer,
'maxVIPsPerLoadBalancer' => Integer,
}
tests('success') do
tests("#list_limits").formats({'limits' => {"absolute" => {"values" => @limits_format }}}) do
HP[:lb].list_limits.body
end
end
end