Debian Codegraph @

spec/acceptance/beaker/git/shallow_clone/negative/shallow_clone_file_path.rb

raw
1 test_name 'C3475 - shallow clone repo minimal depth = 1 (file path protocol)'
2 skip_test 'Not currently supported. See FM-1285'
3
4 # Globals
5 repo_name = 'testrepo_shallow_clone'
6
7 hosts.each do |host|
8 tmpdir = host.tmpdir('vcsrepo')
9 step 'setup - create repo' do
10 git_pkg = 'git'
11 if host['platform'] =~ /ubuntu-10/
12 git_pkg = 'git-core'
13 end
14 install_package(host, git_pkg)
15 my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
16 scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
17 on(host, "cd #{tmpdir} && ./create_git_repo.sh")
18 end
19
20 teardown do
21 on(host, "rm -fr #{tmpdir}")
22 end
23
24 step 'shallow clone repo with puppet' do
25 pp = <<-EOS
26 vcsrepo { "#{tmpdir}/#{repo_name}":
27 ensure => present,
28 source => "#{tmpdir}/testrepo.git",
29 provider => git,
30 depth => 1,
31 }
32 EOS
33
34 apply_manifest_on(host, pp, :catch_failures => true)
35 apply_manifest_on(host, pp, :catch_changes => true)
36 end
37
38 step 'git does not support shallow clone via file path: verify checkout is NOT created' do
39 on(host, "ls #{tmpdir}") do |res|
40 fail_test('checkout found') if res.stdout.include? "#{repo_name}"
41 end
42 end
43
44 end