Skip verification of Docker image if pool size is empty

This commit is contained in:
Sebastian Serth
2021-11-09 17:37:11 +01:00
parent b179dadce6
commit fb92d382ac
3 changed files with 10 additions and 3 deletions

View File

@ -78,7 +78,8 @@ class ExecutionEnvironment < ApplicationRecord
end
def validate_docker_image?
docker_image.present? && !Rails.env.test?
# We only validate the code execution with the provided image if there is at least one container to test with.
pool_size.positive? && docker_image.present? && !Rails.env.test?
end
def working_docker_image?