1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Enable Mock support for Model task tests

This commit is contained in:
Mike Pountney 2014-06-18 21:09:34 +01:00
parent 36c1e6dc7d
commit b33148cba4
2 changed files with 13 additions and 1 deletions

View file

@ -824,6 +824,7 @@ module Fog
:progress => 1,
:service_namespace => 'com.vmware.vcloud',
:start_time => now,
:end_time => now + 86400,
:status => 'running',
}.merge(options).merge(
:operation => operation,

View file

@ -1,7 +1,18 @@
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
Shindo.tests('Compute::VcloudDirector | tasks', ['vclouddirector']) do
pending if Fog.mocking?
@service = Fog::Compute::VcloudDirector.new()
if Fog.mocking?
# add a bunch of tasks
50.times do
type = 'bogus'
task_id = @service.enqueue_task(
"Bogus Task", 'BogusTaskName', {},
)
end
end
tasks = organization.tasks
pending if tasks.empty?