Sha256: 2cd156455f09779c4012c13a9548c1e2011b66a14cfeaf6c9500c87204dccde9

Contents?: true

Size: 1.71 KB

Versions: 2

Compression:

Stored size: 1.71 KB

Contents

test_name "Setup environment"

step "Ensure Git and Ruby"

require 'puppet/acceptance/install_utils'
extend Puppet::Acceptance::InstallUtils
require 'puppet/acceptance/git_utils'
extend Puppet::Acceptance::GitUtils
require 'beaker/dsl/install_utils'
extend Beaker::DSL::InstallUtils

PACKAGES = {
  :redhat => [
    'git',
    'ruby',
    'rubygem-json',
  ],
  :debian => [
    ['git', 'git-core'],
    'ruby',
  ],
  :debian_ruby18 => [
    'libjson-ruby',
  ],
  :solaris => [
    ['git', 'developer/versioning/git'],
    ['ruby', 'runtime/ruby-18'],
    # there isn't a package for json, so it is installed later via gems
  ],
  :windows => [
    'git',
    # there isn't a need for json on windows because it is bundled in ruby 1.9
  ],
}

install_packages_on(hosts, PACKAGES, :check_if_exists => true)

hosts.each do |host|
  case host['platform']
  when /windows/
    step "#{host} Install ruby from git"
    ruby_arch = host[:ruby_arch] || 'x86'
    revision = if ruby_arch == 'x64'
                 '2.0.0-x64'
               else
                 '1.9.3-x86'
               end

    install_from_git(host, "/opt/puppet-git-repos",
                    :name => 'puppet-win32-ruby',
                    :path => build_giturl('puppet-win32-ruby'),
                    :rev  => revision)
    on host, 'cd /opt/puppet-git-repos/puppet-win32-ruby; cp -r ruby/* /'
    on host, 'cd /lib; icacls ruby /grant "Everyone:(OI)(CI)(RX)"'
    on host, 'cd /lib; icacls ruby /reset /T'
    on host, 'cd /; icacls bin /grant "Everyone:(OI)(CI)(RX)"'
    on host, 'cd /; icacls bin /reset /T'
    on host, 'ruby --version'
    on host, 'cmd /c gem list'
  when /solaris/
    step "#{host} Install json from rubygems"
    on host, 'gem install json'
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
facter-3.11.0.cfacter.20180319 ext/facter/facter/acceptance/setup/common/00_EnvSetup.rb
cfacter-3.11.0.rc.20180314 ext/facter/facter/acceptance/setup/common/00_EnvSetup.rb