mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ninefold|compute] mark before/after blocks as pending in mocked mode also
This commit is contained in:
parent
1afde1548a
commit
22f2b652f5
1 changed files with 15 additions and 9 deletions
|
@ -5,16 +5,20 @@ Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
@compute = Fog::Compute[:ninefold]
|
@compute = Fog::Compute[:ninefold]
|
||||||
@public_ip_id = @compute.list_public_ip_addresses.first['id']
|
unless Fog.mocking?
|
||||||
@server_id = @compute.servers.all.first.id
|
@public_ip_id = @compute.list_public_ip_addresses.first['id']
|
||||||
@create_load_balancer = @compute.create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test',
|
@server_id = @compute.servers.all.first.id
|
||||||
:privateport => 1000, :publicport => 2000,
|
@create_load_balancer = @compute.create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test',
|
||||||
:publicipid => @public_ip_id)
|
:privateport => 1000, :publicport => 2000,
|
||||||
|
:publicipid => @public_ip_id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
delete = @compute.delete_load_balancer_ruler(:id => @create_load_balancer['id'])
|
unless Fog.mocking?
|
||||||
Ninefold::Compute::TestSupport.wait_for_job(delete['jobid'])
|
delete = @compute.delete_load_balancer_ruler(:id => @create_load_balancer['id'])
|
||||||
|
Ninefold::Compute::TestSupport.wait_for_job(delete['jobid'])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
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
|
||||||
|
@ -45,8 +49,10 @@ Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
|
||||||
|
|
||||||
tests('with assigned to load balancer rule') do
|
tests('with assigned to load balancer rule') do
|
||||||
before do
|
before do
|
||||||
assign_load_balancer = @compute.assign_to_load_balancer_rule(:id => @create_load_balancer['id'], :virtualmachineids => @server_id)
|
unless Fog.mocking?
|
||||||
result = Ninefold::Compute::TestSupport.wait_for_job(assign_load_balancer['jobid'])
|
assign_load_balancer = @compute.assign_to_load_balancer_rule(:id => @create_load_balancer['id'], :virtualmachineids => @server_id)
|
||||||
|
result = Ninefold::Compute::TestSupport.wait_for_job(assign_load_balancer['jobid'])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
tests("#remove_from_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::REMOVE_FROM_LOAD_BALANCER_RULE_RESPONSE) do
|
tests("#remove_from_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::REMOVE_FROM_LOAD_BALANCER_RULE_RESPONSE) do
|
||||||
|
|
Loading…
Add table
Reference in a new issue