From 42cd1ef1ef9a4c65375b5de086962efb352a945f Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Mon, 9 Jul 2018 13:06:05 +0200 Subject: [PATCH] Don't be overzealous with passing the environment Without this change, the gem helper passes the entirely of the user's environment through beaker's SSH connection. This causes problems with puppet 4 because all of the ruby and bundler arguments confuse the ruby interpreter and we see errors like this: /var/lib/gems/2.3.0/gems/bundler-1.16.2/lib/bundler/spec_set.rb:91:in `block in materialize' : Could not find rake-12.2.1 in any of the sources ( Bundler::GemNotFound ) The only important variable is PUPPET_VERSION so just pass that and nothing else. Change-Id: I678716890d0c749e755ec0526621d47fee44a4bb --- .../spec_helper_acceptance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet-openstack_infra_spec_helper/spec_helper_acceptance.rb b/lib/puppet-openstack_infra_spec_helper/spec_helper_acceptance.rb index d13ba17..764b25c 100755 --- a/lib/puppet-openstack_infra_spec_helper/spec_helper_acceptance.rb +++ b/lib/puppet-openstack_infra_spec_helper/spec_helper_acceptance.rb @@ -34,7 +34,7 @@ def install_infra_modules(host, proj_root) # Install module and dependencies modname = JSON.parse(open('metadata.json').read)['name'].split('-')[1] module_install_cmd = "bash #{ENV['HOME']}/src/#{SYSTEM_CONFIG}/tools/install_modules_acceptance.sh" - on host, module_install_cmd, :environment => ENV.to_hash + on host, module_install_cmd, :environment => {'PUPPET_VERSION' => ENV['PUPPET_VERSION']} if ENV['PUPPET_VERSION'] == '4' on host, "rm -fr /etc/puppetlabs/code/modules/#{modname}" else