summaryrefslogtreecommitdiff
path: root/spec/acceptance/beaker_helper.rb
blob: 414796daf88bf27aedb1a88d7b31715b6ba7e79a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
test_name "Installing Puppet and vcsrepo module" do
  step 'install puppet' do
    if @options[:provision]
      # This will fail if puppet is already installed, ie --no-provision
      if hosts.first.is_pe?
        install_pe
      else
        install_puppet
        on hosts, "mkdir -p #{hosts.first['distmoduledir']}"
      end
    end
  end
  step 'install module' do
    proj_root = File.expand_path(File.join(File.dirname(__FILE__),'..','..'))
    # Waiting on release of puppet_module_install in beaker
    #puppet_module_install(:source => proj_root, :module_name => 'vcsrepo')
    scp_to(hosts, proj_root, File.join(hosts.first['distmoduledir'], 'vcsrepo'))
    gitconfig = <<-EOS
[user]
	email = root@localhost
	name = root
EOS
    create_remote_file(hosts.first, "/root/.gitconfig", script)
  end
end