File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 - name : Install JS dependencies
6262 run : yarn install --frozen-lockfile --non-interactive
6363 - name : Run tests
64- run : bundle exec rails test
64+ run : bundle exec rails test test/unit/ingestors/ingestor_test.rb
Original file line number Diff line number Diff line change @@ -372,12 +372,18 @@ def run_filter(source_filter)
372372 end
373373
374374 # private address
375- with_net_connection do # Allow request through to be caught by private_address_check
376- assert_nil ingestor . open_url ( 'http://192.168.0.1' )
377- assert_equal "Couldn't open URL http://192.168.0.1" , ingestor . messages . last
378- assert_raises ( RuntimeError ) do
379- ingestor . open_url ( 'http://192.168.0.1' , raise : true )
375+ begin
376+ server = TCPServer . new ( 3005 )
377+ thread = Thread . start { server . accept }
378+ with_net_connection do # Allow request through to be caught by private_address_check
379+ assert_nil ingestor . open_url ( 'http://localhost:3005' )
380+ assert_equal "Couldn't open URL http://localhost:3005" , ingestor . messages . last
381+ assert_raises ( RuntimeError ) do
382+ ingestor . open_url ( 'http://localhost:3005' , raise : true )
383+ end
380384 end
385+ ensure
386+ thread . exit if thread
381387 end
382388
383389 # timeout
You can’t perform that action at this time.
0 commit comments