3 unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
4 # This will install the latest available package on el and deb based
5 # systems fail on windows and osx, and install via gem on other *nixes
6 foss_opts = { :default_action => 'gem_install' }
8 if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
12 on hosts, "mkdir -p #{hosts.first['distmoduledir']}"
15 # We ask the host to interpolate it's distmoduledir because we don't
16 # actually know it on Windows until we've let it redirect us (depending
17 # on whether we're running as a 32/64 bit process on 32/64 bit Windows
18 moduledir = on(host, "echo #{host['distmoduledir']}").stdout.chomp
19 on host, "mkdir -p #{moduledir}"
24 RSpec.configure do |c|
26 proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
28 # Readable test descriptions
29 c.formatter = :documentation
31 # Configure all nodes in nodeset
34 # ensure test dependencies are available on all hosts
36 copy_module_to(host, :source => proj_root, :module_name => 'vcsrepo')
37 case fact_on(host, 'osfamily')
39 if fact_on(host, 'operatingsystemmajrelease') == '5'
40 will_install_git = on(host, 'which git', :acceptable_exit_codes => [0,1]).exit_code == 1
43 on host, puppet('module install stahnma-epel')
44 apply_manifest_on( host, 'include epel' )
49 install_package(host, 'git')
52 install_package(host, 'git-core')
55 if !check_for_package(host, 'git')
56 puts "Git package is required for this module"
60 on host, 'git config --global user.email "root@localhost"'
61 on host, 'git config --global user.name "root"'