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,
|
"account"=>String,
|
||||||
"algorithm"=>String,
|
"algorithm"=>String,
|
||||||
"cidrlist"=>String,
|
"cidrlist"=>String,
|
||||||
"description"=>String,
|
|
||||||
"domain"=>String,
|
"domain"=>String,
|
||||||
"domainid"=>Integer,
|
"domainid"=>Integer,
|
||||||
"name"=>String,
|
"name"=>String,
|
||||||
"privateport"=>Integer,
|
"privateport"=>String,
|
||||||
"publicip"=>Integer,
|
"publicip"=>String,
|
||||||
"publicport"=>Integer,
|
"publicipid"=>Integer,
|
||||||
|
"publicport"=>String,
|
||||||
"state"=>String,
|
"state"=>String,
|
||||||
"zoneid"=>Integer
|
"zoneid"=>Integer
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
|
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
|
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
|
tests("#create_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::CREATE_LOAD_BALANCER_RULE_RESPONSE) do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
job = Fog::Compute[:ninefold].create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test', :privateport => 1000, :publicport => 2000)
|
compute = Fog::Compute[:ninefold]
|
||||||
Ninefold::Compute::TestSupport.wait_for_job(job)['jobresult']['createloadbalancerruleresponse']
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue