module Beaker::Librarian

Constants

VERSION

Public Instance Methods

install_librarian(opts = {}) click to toggle source

Install rubygems and the librarian-puppet gem onto each host

# File lib/beaker/librarian.rb, line 10
def install_librarian(opts = {})
  hosts.each do |host|
    install_package host, 'rubygems'
    install_package host, 'git'
    on host, 'gem install librarian-puppet'
  end
end
librarian_install_modules(directory, module_name) click to toggle source

Copy the module under test to a temporary directory onto the host, and execute librarian-puppet to install dependencies into the ‘distmoduledir’.

This also manually installs the module under test into ‘distmoduledir’, but I’m noting here that this is something I believe should be handled automatically by librarian-puppet, but is not.

# File lib/beaker/librarian.rb, line 23
def librarian_install_modules(directory, module_name)
  hosts.each do |host|
    sut_dir = File.join('/tmp', module_name)
    scp_to host, directory, sut_dir

    on host, "cd #{sut_dir} && librarian-puppet install --clean --verbose --path #{host['distmoduledir']}"

    puppet_module_install(:source => directory, :module_name => module_name)
  end
end