diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index a6354d8d..4ec2e7bc 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -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 diff --git a/spec/controllers/submissions_controller_spec.rb b/spec/controllers/submissions_controller_spec.rb index 8d83943c..38274053 100644 --- a/spec/controllers/submissions_controller_spec.rb +++ b/spec/controllers/submissions_controller_spec.rb @@ -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