Fix socket being nil in tests

This commit is contained in:
Maximilian Grundke
2018-06-15 14:23:20 +02:00
parent 90d1dcdc37
commit 6b6fec025d

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) }