Refactor error classes

All runner errors are now in a single file. The not found error
has been splitted into an error for runner not found and for
environment not found.
This commit is contained in:
Felix Auringer
2021-06-14 09:56:27 +02:00
committed by Sebastian Serth
parent 413f9b2705
commit b48b45de9f
11 changed files with 29 additions and 32 deletions

View File

@ -53,7 +53,7 @@ describe Runner::Strategy::Poseidon do
let(:response_status) { 404 }
it 'raises an error' do
expect { action.call }.to raise_error(Runner::Error::NotFound, /Runner/)
expect { action.call }.to raise_error(Runner::Error::RunnerNotFound)
end
end
end
@ -152,7 +152,7 @@ describe Runner::Strategy::Poseidon do
let(:response_status) { 404 }
it 'raises an error' do
expect { action.call }.to raise_error(Runner::Error::NotFound, /Execution environment/)
expect { action.call }.to raise_error(Runner::Error::EnvironmentNotFound)
end
end