summaryrefslogtreecommitdiff
path: root/spec/spec_helper_acceptance.rb
diff options
context:
space:
mode:
authorJustin Stoller <justin.stoller@gmail.com>2014-06-18 14:02:33 -0700
committerJustin Stoller <justin.stoller@gmail.com>2014-06-18 14:14:00 -0700
commit02c38ece76ba621807f0a415d0ea90fff0f395bb (patch)
treefae517b692c5b9ae0f5124e9fd9fcef4b04e5a06 /spec/spec_helper_acceptance.rb
parentbb3b5283fc40226cad5a616b93bef492dba37f25 (diff)
(QENG-798) Update acceptance helpers to create distmoduledir
Previously we were creating the module dir on foss installs, but not on PE. PE agents do not have a module dir deployed as part of the base PE install, so to test on PE agents we need to create the module dir. `mkdir -p` is idempotent, so we use it as a cudgle here. We also update the beaker_helper and spec_helper_acceptance to contain the same installation steps for test dependencies, warnings, and installation methods.
Diffstat (limited to 'spec/spec_helper_acceptance.rb')
-rw-r--r--spec/spec_helper_acceptance.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index c371f1f..e566a12 100644
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -9,6 +9,12 @@ unless ENV['RS_PROVISION'] == 'no'
install_puppet
on hosts, "mkdir -p #{hosts.first['distmoduledir']}"
end
+
+ # We ask the host to interpolate it's distmoduledir because we don't
+ # actually know it on Windows until we've let it redirect us (depending
+ # on whether we're running as a 32/64 bit process on 32/64 bit Windows
+ moduledir = on(host, "echo #{host['distmoduledir']}").stdout.chomp
+ on host, "mkdir -p #{moduledir}"
end
end
@@ -21,10 +27,12 @@ RSpec.configure do |c|
# Configure all nodes in nodeset
c.before :suite do
- # Install module and dependencies
+ # Install module and dependencies on all hosts
puppet_module_install(:source => proj_root, :module_name => 'vcsrepo')
+
+ # ensure test dependencies are available on all hosts
hosts.each do |host|
- case fact('osfamily')
+ case fact_on(host, 'osfamily')
when 'RedHat'
install_package(host, 'git')
when 'Debian'
@@ -35,8 +43,8 @@ RSpec.configure do |c|
exit
end
end
- shell('git config --global user.email "root@localhost"')
- shell('git config --global user.name "root"')
+ on host, 'git config --global user.email "root@localhost"'
+ on host, 'git config --global user.name "root"'
end
end
end