Merge pull request #180 from openHPI/parse-errors-on-stop

Fix socket being nil in tests
This commit is contained in:
rteusner
2018-06-15 15:04:17 +02:00
committed by GitHub

View File

@ -186,7 +186,9 @@ class DockerClient
end end
def self.destroy_container(container) def self.destroy_container(container)
@socket.close if @socket
@socket.close
end
Rails.logger.info('destroying container ' + container.to_s) Rails.logger.info('destroying container ' + container.to_s)
container.stop.kill container.stop.kill
container.port_bindings.values.each { |port| PortPool.release(port) } container.port_bindings.values.each { |port| PortPool.release(port) }