Fix tests for Runner#attach_to_execution

These tests were blocking because of the newly introduced
EventLoop. The messages sent to the EventLoop are now mocked
and the EventLoop isn't blocking anymore in the tests.
This commit is contained in:
Felix Auringer
2021-07-22 09:09:38 +02:00
committed by Sebastian Serth
parent c7369366d5
commit c8e1a0bbcb
3 changed files with 7 additions and 2 deletions

View File

@ -264,7 +264,8 @@ describe Runner::Strategy::DockerContainerPool do
# TODO: add tests here
let(:command) { 'ls' }
let(:action) { -> { container_pool.attach_to_execution(command) } }
let(:event_loop) { Runner::EventLoop.new }
let(:action) { -> { container_pool.attach_to_execution(command, event_loop) } }
let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' }
end
end