Sha256: 2a6861dd7703be428ceeda6c88ea86b7990a54451f47707a57cdcf15dfc46178

Contents?: true

Size: 1.46 KB

Versions: 7

Compression:

Stored size: 1.46 KB

Contents

begin
  $LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
  require 'beaker/acceptance/install_utils'
  extend Beaker::Acceptance::InstallUtils
end
test_name 'Clone from git'

PACKAGES = {
  :redhat => [
    'git',
  ],
  :debian => [
    ['git', 'git-core'],
  ],
  :solaris_11 => [
    ['git', 'developer/versioning/git'],
  ],
  :solaris_10 => [
    'coreutils',
    'curl', # update curl to fix "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!" issue
    'git',
  ],
  :windows => [
    'git',
  ],
  :sles => [
    'git-core',
  ]
}

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

# build_giturl implicitly looks these up
ENV['HIERA_FORK']='puppetlabs'
ENV['FORK']='fail'

# implicitly tests build_giturl() and lookup_in_env()
hosts.each do |host|
  on host, "echo #{GitHubSig} >> $HOME/.ssh/known_hosts"
  testdir = create_tmpdir_on(host, File.basename(__FILE__))

  step 'should find fork name from the correct environment variable'
  results = clone_git_repo_on(host, "#{testdir}", extract_repo_info_from(build_git_url('puppet')))
  assert_match( /github\.com\/fail/, result.cmd, 'Did not find correct fork name')
  assert_equal( 1, result.exit_code, 'Did not produce error exit_code of 1')

  step 'should clone hiera from correct fork'
  results = clone_git_repo_on(host, "#{testdir}", extract_repo_info_from(build_git_url('hiera')))
  assert_match( /From.*github\.com\/puppetlabs\/hiera/, result.output, 'Did not find clone')
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
beaker-2.27.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.26.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.25.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.24.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.23.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.22.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb
beaker-2.21.0 acceptance/tests/dsl/install_utils/clone_git_repo_on.rb