mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	[storm_on_demand|compute] fixes for tests
This commit is contained in:
		
							parent
							
								
									f2a32fd804
								
							
						
					
					
						commit
						c1c1ffb63a
					
				
					 3 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -37,7 +37,7 @@ module Fog
 | 
			
		|||
          load(data)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def delete
 | 
			
		||||
        def destroy
 | 
			
		||||
          requires :identity
 | 
			
		||||
          connection.delete_server(:uniq_id => identity)
 | 
			
		||||
          true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -110,8 +110,8 @@ module Fog
 | 
			
		|||
          unless response.body.empty?
 | 
			
		||||
            response.body = JSON.parse(response.body)
 | 
			
		||||
          end
 | 
			
		||||
          if response.body.keys[0] == 'error_class'
 | 
			
		||||
            raise Fog::StormOnDemand::Compute::Error, response.body.inspect
 | 
			
		||||
          if response.body.keys.include?('full_error')
 | 
			
		||||
            raise(Fog::StormOnDemand::Compute::Error, response.body.inspect)
 | 
			
		||||
          end
 | 
			
		||||
          response
 | 
			
		||||
        end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,12 +44,12 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    unless Fog.mocking?
 | 
			
		||||
      StormOnDemand[:compute].servers.get(:uniq_id => @uniq_id).wait_for { ready? }
 | 
			
		||||
      StormOnDemand[:compute].servers.get(@uniq_id).wait_for { ready? }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    tests("#delete_server(:uniq_id => #{@uniq_id})").succeeds do
 | 
			
		||||
      pending if Fog.mocking?
 | 
			
		||||
      StormOnDemand[:compute].delete_server(@uniq_id)
 | 
			
		||||
      StormOnDemand[:compute].delete_server(:uniq_id => @uniq_id)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			@ -57,7 +57,7 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
 | 
			
		|||
  tests('failure') do
 | 
			
		||||
    tests('#delete_server(0)').raises(Fog::StormOnDemand::Compute::Error) do
 | 
			
		||||
      pending if Fog.mocking?
 | 
			
		||||
      StormOnDemand[:compute].delete_server(0)
 | 
			
		||||
      StormOnDemand[:compute].delete_server(:uniq_id => 'XXXXXX')
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue