Debian Codegraph @

spec/acceptance/beaker/git/create/negative/create_bare_repo_specifying_revision.rb

raw
1 test_name 'C3473 - create bare repo specifying revision'
2
3 # Globals
4 repo_name = 'testrepo_bare.git'
5
6 hosts.each do |host|
7 tmpdir = host.tmpdir('vcsrepo')
8 step 'setup' do
9 git_pkg = 'git'
10 if host['platform'] =~ /ubuntu-10/
11 git_pkg = 'git-core'
12 end
13 install_package(host, git_pkg)
14 end
15
16 teardown do
17 on(host, "rm -fr #{tmpdir}")
18 end
19
20 step 'create bare repo specifying revision using puppet' do
21 pp = <<-EOS
22 vcsrepo { "#{tmpdir}/#{repo_name}":
23 ensure => bare,
24 revision => master,
25 provider => git,
26 }
27 EOS
28
29 apply_manifest_on(host, pp, :expect_failures => true)
30 end
31
32 step 'verify repo does not contain .git directory' do
33 on(host, "ls -al #{tmpdir}") do |res|
34 fail_test "found repo for #{repo_name}" if res.stdout.include? repo_name
35 end
36 end
37
38 end