1
0
Fork 0
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:
geemus 2012-09-28 09:59:49 -05:00
parent 1afde1548a
commit 22f2b652f5

View file

@ -5,17 +5,21 @@ Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
before do
@compute = Fog::Compute[:ninefold]
unless Fog.mocking?
@public_ip_id = @compute.list_public_ip_addresses.first['id']
@server_id = @compute.servers.all.first.id
@create_load_balancer = @compute.create_load_balancer_rule(:algorithm => 'roundrobin', :name => 'test',
:privateport => 1000, :publicport => 2000,
:publicipid => @public_ip_id)
end
end
after do
unless Fog.mocking?
delete = @compute.delete_load_balancer_ruler(:id => @create_load_balancer['id'])
Ninefold::Compute::TestSupport.wait_for_job(delete['jobid'])
end
end
tests("#create_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::CREATE_LOAD_BALANCER_RULE_RESPONSE) do
pending if Fog.mocking?
@ -45,9 +49,11 @@ Shindo.tests('Fog::Compute[:ninefold] | load balancers', ['ninefold']) do
tests('with assigned to load balancer rule') do
before do
unless Fog.mocking?
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
tests("#remove_from_load_balancer_rule()").formats(Ninefold::Compute::Formats::LoadBalancers::REMOVE_FROM_LOAD_BALANCER_RULE_RESPONSE) do
pending if Fog.mocking?