mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Test interfaces include localhost
When interfaces do not include localhost, some other tests may fail.
This commit is contained in:
		
							parent
							
								
									2c8d186c6e
								
							
						
					
					
						commit
						2f6a8baac6
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -121,6 +121,15 @@ class TestSocket < Test::Unit::TestCase
 | 
			
		|||
    }
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_ip_address_list_include_localhost
 | 
			
		||||
    begin
 | 
			
		||||
      list = Socket.ip_address_list
 | 
			
		||||
    rescue NotImplementedError
 | 
			
		||||
      return
 | 
			
		||||
    end
 | 
			
		||||
    assert_includes list.map(&:ip_address), Addrinfo.tcp("localhost", 0).ip_address
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_tcp
 | 
			
		||||
    TCPServer.open(0) {|serv|
 | 
			
		||||
      addr = serv.connect_address
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue