1 test_name 'C3509 - clone repo with excludes not in repo'
2 skip_test 'expectations not defined'
5 repo_name = 'testrepo_with_excludes_not_in_repo'
6 exclude1 = "`exec \"rm -rf /tmp\"`"
9 tmpdir = host.tmpdir('vcsrepo')
10 step 'setup - create repo' do
11 install_package(host, 'git')
12 my_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../../..'))
13 scp_to(host, "#{my_root}/acceptance/files/create_git_repo.sh", tmpdir)
14 on(host, "cd #{tmpdir} && ./create_git_repo.sh")
18 on(host, "rm -fr #{tmpdir}")
21 step 'clone repo with excludes not in repo with puppet' do
23 vcsrepo { "#{tmpdir}/#{repo_name}":
25 source => "file://#{tmpdir}/testrepo.git",
27 excludes => [ '#{exclude1}' ],
31 apply_manifest_on(host, pp, :catch_failures => true)
32 apply_manifest_on(host, pp, :catch_changes => true)
35 step 'verify excludes are known to git' do
36 on(host, "cat #{tmpdir}/#{repo_name}/.git/info/exclude") do |res|
37 fail_test('exclude not found') unless res.stdout.include? "#{exclude1}"