Merge pull request #180 from openHPI/parse-errors-on-stop
Fix socket being nil in tests
This commit is contained in:
@ -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) }
|
||||||
|
Reference in New Issue
Block a user