diff --git a/spec/lib/runner/strategy/docker_container_pool_spec.rb b/spec/lib/runner/strategy/docker_container_pool_spec.rb index 26568b6f..9f75e241 100644 --- a/spec/lib/runner/strategy/docker_container_pool_spec.rb +++ b/spec/lib/runner/strategy/docker_container_pool_spec.rb @@ -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 diff --git a/spec/lib/runner/strategy/poseidon_spec.rb b/spec/lib/runner/strategy/poseidon_spec.rb index ef04a6f7..79c4935b 100644 --- a/spec/lib/runner/strategy/poseidon_spec.rb +++ b/spec/lib/runner/strategy/poseidon_spec.rb @@ -292,7 +292,8 @@ describe Runner::Strategy::Poseidon do # TODO: add tests here let(:command) { 'ls' } - let(:action) { -> { poseidon.attach_to_execution(command) } } + let(:event_loop) { Runner::EventLoop.new } + let(:action) { -> { poseidon.attach_to_execution(command, event_loop) } } let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' } end end diff --git a/spec/models/runner_spec.rb b/spec/models/runner_spec.rb index 5202d403..4bea42e0 100644 --- a/spec/models/runner_spec.rb +++ b/spec/models/runner_spec.rb @@ -62,10 +62,13 @@ describe Runner do describe '#attach to execution' do let(:runner) { described_class.create } let(:command) { 'ls' } + let(:event_loop) { instance_double(Runner::EventLoop) } before do allow(strategy_class).to receive(:request_from_management).and_return(runner_id) allow(strategy_class).to receive(:new).and_return(strategy) + allow(event_loop).to receive(:wait) + allow(Runner::EventLoop).to receive(:new).and_return(event_loop) end it 'delegates to its strategy' do