Fix tests in models/execution_environment_spec.rb, uncomment @image in lib/docker_client.rb

This commit is contained in:
yqbk
2016-05-25 15:56:49 +02:00
parent 5dc8fb9774
commit 7bc3c4e27c
3 changed files with 6 additions and 6 deletions

View File

@ -48,6 +48,7 @@ class ExecutionEnvironment < ActiveRecord::Base
def working_docker_image?
DockerClient.pull(docker_image) unless DockerClient.image_tags.include?(docker_image)
output = DockerClient.new(execution_environment: self).execute_arbitrary_command(VALIDATION_COMMAND)
errors.add(:docker_image, "error: #{output[:stderr]}") if output[:stderr].present?
rescue DockerClient::Error => error
errors.add(:docker_image, "error: #{error}")