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: I65d65358ca0c0fb9d01ed73bb156334fa5fa6edc
This commit is contained in:
Simon Pasquier 2015-09-07 10:02:17 +02:00
parent ae84459eb4
commit a630a235be
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:lma_logging_analytics]
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:disk_management]
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