Fix tests when executed by Jenkins slaves

The Puppet tests fail on Jenkins because bundler tries to install the
Ruby gems to the default GEM_HOME which is protected. This change sets
the GEM_HOME variable to a local directory.

Change-Id: Ic28276b3c2aa9224cbae839a040884871b0521a8
This commit is contained in:
Simon Pasquier 2015-09-04 16:22:38 +02:00
parent d4a45528bb
commit cf79f9d324
2 changed files with 13 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.bundled_gems/

14
tox.ini
View File

@ -5,15 +5,25 @@ skipsdist = True
[testenv:heka]
deps =
changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname}
whitelist_externals = bundle
whitelist_externals =
bundle
mkdir
setenv =
GEM_HOME={toxinidir}/.bundled_gems
commands =
mkdir -p {toxinidir}/.bundled_gems
bundle install
bundle exec rake test
[testenv:lma_collector]
deps =
changedir = {toxinidir}/deployment_scripts/puppet/modules/{envname}
whitelist_externals = bundle
whitelist_externals =
bundle
mkdir
setenv =
GEM_HOME={toxinidir}/.bundled_gems
commands =
mkdir -p {toxinidir}/.bundled_gems
bundle install
bundle exec rake test