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:
		
							parent
							
								
									36c1e6dc7d
								
							
						
					
					
						commit
						b33148cba4
					
				
					 2 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue