Add tests for DockerContainerPool strategy

This commit is contained in:
Felix Auringer
2021-06-23 17:01:35 +02:00
committed by Sebastian Serth
parent 704407b9fc
commit db2d1e3164
3 changed files with 271 additions and 7 deletions

View File

@ -292,7 +292,7 @@ describe Runner::Strategy::Poseidon do
# TODO: add more tests here
let(:command) { 'ls' }
let(:action) { -> { poseidon.attach_to_execution command } }
let(:action) { -> { poseidon.attach_to_execution(command) } }
let(:websocket_url) { 'ws://ws.example.com/path/to/websocket' }
it 'returns the execution time' do
@ -302,7 +302,7 @@ describe Runner::Strategy::Poseidon do
starting_time = Time.zone.now
execution_time = action.call
test_time = Time.zone.now - starting_time
expect(execution_time).to be_between(0.0, test_time)
expect(execution_time).to be_between(0.0, test_time).exclusive
end
end
end