mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fix create load balancer test.
This commit is contained in:
parent
2163cfc5c3
commit
a5a3ee95f9
2 changed files with 14 additions and 6 deletions
|
@ -318,13 +318,13 @@ class Ninefold
|
|||
"account"=>String,
|
||||
"algorithm"=>String,
|
||||
"cidrlist"=>String,
|
||||
"description"=>String,
|
||||
"domain"=>String,
|
||||
"domainid"=>Integer,
|
||||
"name"=>String,
|
||||
"privateport"=>Integer,
|
||||
"publicip"=>Integer,
|
||||
"publicport"=>Integer,
|
||||
"privateport"=>String,
|
||||
"publicip"=>String,
|
||||
"publicipid"=>Integer,
|
||||
"publicport"=>String,
|
||||
"state"=>String,
|
||||
"zoneid"=>Integer
|
||||
}
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
|
||||
|
||||
# NOTE: all of these tests require you to have a vm built with a public IP address.
|
||||
tests('success') do
|
||||
|
||||
p Ninefold::Compute::Formats::LoadBalancers::CREATE_LOAD_BALANCER_RULE_RESPONSE
|
||||
tests("#create_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::CREATE_LOAD_BALANCER_RULE_RESPONSE) do
|
||||
pending if Fog.mocking?
|
||||
job = Fog::Compute[:ninefold].create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test', :privateport => 1000, :publicport => 2000)
|
||||
Ninefold::Compute::TestSupport.wait_for_job(job)['jobresult']['createloadbalancerruleresponse']
|
||||
compute = Fog::Compute[:ninefold]
|
||||
public_ip_id = compute.list_public_ip_addresses.first['id']
|
||||
create_load_balancer = compute.create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test',
|
||||
:privateport => 1000, :publicport => 2000,
|
||||
:publicipid => public_ip_id)
|
||||
result = Ninefold::Compute::TestSupport.wait_for_job(create_load_balancer['jobid'])
|
||||
compute.delete_load_balancer_rule id: create_load_balancer['id']
|
||||
result['jobresult']['loadbalancer']
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue