2011-05-09 20:22:23 -04:00
|
|
|
# This will fail until there are jobs in the system.
|
|
|
|
|
2011-06-22 18:08:38 -04:00
|
|
|
Shindo.tests('Fog::Compute[:ninefold] | async job requests', ['ninefold']) do
|
2011-05-09 20:22:23 -04:00
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
tests("#list_async_jobs()").formats(Ninefold::Compute::Formats::Jobs::JOBS) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
jobs = Fog::Compute[:ninefold].list_async_jobs()
|
2011-05-09 20:22:23 -04:00
|
|
|
unless jobs[0]
|
|
|
|
raise "No async jobs in system yet - create a VM through web UI to create"
|
|
|
|
end
|
|
|
|
@jobid = jobs[0]['jobid']
|
|
|
|
jobs
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#query_async_job_result()").formats(Ninefold::Compute::Formats::Jobs::JOB_QUERY) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:ninefold].query_async_job_result(:jobid => @jobid)
|
2011-05-09 20:22:23 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
#tests("#deploy_virtual_machine()").raises(Excon::Errors::HTTPStatusError) do
|
|
|
|
# pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
# Fog::Compute[:ninefold].deploy_virtual_machine
|
2011-05-09 20:22:23 -04:00
|
|
|
#end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|