voxmedia / autotune

Platform for reusable news tools
BSD 3-Clause "New" or "Revised" License
414 stars 33 forks source link

Dockerized Test Suite #334

Closed clifff closed 8 years ago

clifff commented 8 years ago

Purpose

Hypothetically, it would be pretty great if every test suite than ran on a Jenkins server had a self contained environment to put it's dependencies in rather than installing dependencies for every application on the Jenkins host. Less hypothetically, this PR adds some facilities to do such a thing.

Assuming you have docker installed, tests can now be run with a simple bin/test_docker_build.sh

Notable Changes

Some changes were made to WorkDir, specifically so that GEM_PATH can be injected into it's environment. In testing, we were seeing that the bundler gem wasn't available in gem list, which makes sense, because when tests are executed within bundle exec, only Gems in that bundle are available, and Bundler generally isn't actually listed in bundles.

Meme

me trying to figure out gem paths inside a ruby process inside bundler inside docker

kavyasukumar commented 8 years ago

Merging PR. I have not tested it in docker itself. But verified that regular bundler exec of test is unaffected