solved logger error

This commit is contained in:
yqbk
2016-06-15 15:13:31 +02:00
parent 195fd9c3f9
commit d921f90a65
2 changed files with 3 additions and 6 deletions

View File

@ -246,9 +246,8 @@ class SubmissionsController < ApplicationController
end
def stop
# temporary disabled
# Rails.logger.error('stopping submission ' + @submission)
container = Docker::Container.get(params[:container_id])
Rails.logger.debug('stopping submission ' + @submission.id.to_s)
container = Docker::Container.get(params[:containtier_id])
DockerClient.destroy_container(container)
rescue Docker::Error::NotFoundError
ensure

View File

@ -200,9 +200,8 @@ describe SubmissionsController do
context 'when the container can be found' do
before(:each) do
#not sure where is a correct place for this call. Need to change structure of this test?
#expect(Rails.logger).to receive(:error).with(/error message/)
expect(Docker::Container).to receive(:get).and_return(CONTAINER)
#expect(Rails.logger).to receive(:debug).at_least(:once).and_call_original
request.call
end
@ -215,7 +214,6 @@ describe SubmissionsController do
context 'when the container cannot be found' do
before(:each) do
#expect(Rails.logger).to receive(:error).with(/error message/)
expect(Docker::Container).to receive(:get).and_raise(Docker::Error::NotFoundError)
request.call
end