Imported puppetlabs-vcsrepo
This commit is contained in:
parent
0938a13fe6
commit
18d9aa4a23
152 changed files with 9191 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3495 - checkout with compression 0'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 0 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 0,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3496 - checkout with compression 1'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 1 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 1,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3497 - checkout with compression 2'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 2 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 2,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3498 - checkout with compression 3'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 3 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 3,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3499 - checkout with compression 4'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 4 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 4,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3500 - checkout with compression 5'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 5 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 5,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3501 - checkout with compression 6'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 6 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 6,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3503 - checkout with compression 7'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 7 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 7,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3505 - checkout with compression alpha'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression alpha with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => abcde,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3504 - checkout with compression 10-5'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression 10-5 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => 10-5,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3506 - checkout with compression exec'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression exec with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => "exec 'rm -rf /tmp'",
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,43 @@
|
|||
test_name 'C3502 - checkout with compression -1'
|
||||
|
||||
# Globals
|
||||
repo_name = 'testrepo_checkout'
|
||||
|
||||
hosts.each do |host|
|
||||
tmpdir = host.tmpdir('vcsrepo')
|
||||
step 'setup - create repo' do
|
||||
git_pkg = 'git'
|
||||
if host['platform'] =~ /ubuntu-10/
|
||||
git_pkg = 'git-core'
|
||||
end
|
||||
install_package(host, git_pkg)
|
||||
my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
|
||||
scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
|
||||
on(host, "cd #{tmpdir} && ./create_git_repo.sh")
|
||||
end
|
||||
|
||||
teardown do
|
||||
on(host, "rm -fr #{tmpdir}")
|
||||
end
|
||||
|
||||
step 'checkout with compression -1 with puppet' do
|
||||
pp = <<-EOS
|
||||
vcsrepo { "#{tmpdir}/#{repo_name}":
|
||||
ensure => present,
|
||||
source => "file://#{tmpdir}/testrepo.git",
|
||||
provider => git,
|
||||
compression => -1,
|
||||
}
|
||||
EOS
|
||||
|
||||
apply_manifest_on(host, pp, :catch_failures => true)
|
||||
apply_manifest_on(host, pp, :catch_changes => true)
|
||||
end
|
||||
|
||||
step 'verify git repo was checked out' do
|
||||
on(host, "ls #{tmpdir}/#{repo_name}/.git/") do |res|
|
||||
fail_test('checkout not found') unless res.stdout.include? "HEAD"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue