diff options
author | John Duarte <john.duarte@puppetlabs.com> | 2014-05-10 09:36:26 -0700 |
---|---|---|
committer | John Duarte <john.duarte@puppetlabs.com> | 2014-05-18 11:38:19 -0700 |
commit | 35fd8b137fa83d34eb90df400ccd1da78a947b18 (patch) | |
tree | cd7ccc58015dadb5d94bc9f0158aa8d6868e7571 /spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb | |
parent | 60d5e83205a38f714ae678142e14a0d223076028 (diff) |
Add beaker tests for git create
Diffstat (limited to 'spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb')
-rw-r--r-- | spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb b/spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb new file mode 100644 index 0000000..6a12c8c --- /dev/null +++ b/spec/acceptance/beaker/create/negative/create_bare_repo_specifying_revision.rb @@ -0,0 +1,34 @@ +test_name 'C3473 - create bare repo specifying revision' + +# Globals +repo_name = 'testrepo_bare.git' + +hosts.each do |host| + tmpdir = host.tmpdir('vcsrepo') + step 'setup' do + install_package(host, 'git') + end + + teardown do + on(host, "rm -fr #{tmpdir}") + end + + step 'create bare repo specifying revision using puppet' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => bare, + revision => master, + provider => git, + } + EOS + + apply_manifest_on(host, pp, :acceptable_exit_codes => [1]) + end + + step 'verify repo was NOT created' do + on(host, "ls -al #{tmpdir}") do |res| + fail_test "found #{repo_name}" if res.stdout.include? "#{repo_name}" + end + end + +end |