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:
parent
5801cc4520
commit
df41397601
2 changed files with 31 additions and 0 deletions
|
@ -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
|
||||
|
|
18
tests/hp/requests/lb/list_limits.rb
Normal file
18
tests/hp/requests/lb/list_limits.rb
Normal 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
|
Loading…
Reference in a new issue