From 3c41c39e19b63d76001fe980a2b8281221e6175e Mon Sep 17 00:00:00 2001 From: John Duarte Date: Mon, 5 May 2014 21:04:24 -0700 Subject: Add test for git clone using file path --- spec/acceptance/git_clone_protocols_spec.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'spec/acceptance') diff --git a/spec/acceptance/git_clone_protocols_spec.rb b/spec/acceptance/git_clone_protocols_spec.rb index ec56625..ec99629 100644 --- a/spec/acceptance/git_clone_protocols_spec.rb +++ b/spec/acceptance/git_clone_protocols_spec.rb @@ -68,6 +68,31 @@ hosts.each do |host| end + context 'using local protocol (file path)' do + before(:all) do + on(host,apply_manifest("file {'#{tmpdir}/testrepo': ensure => directory, purge => true, recurse => true, recurselimit => 1, force => true; }")) + end + + it 'should have HEAD pointing to master' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/testrepo": + ensure => present, + provider => git, + source => "#{tmpdir}/testrepo.git", + } + EOS + + # Run it twice and test for idempotency + on(host,apply_manifest(pp, :catch_failures => true)) + on(host,apply_manifest(pp, :catch_changes => true)) + end + + describe file("#{tmpdir}/testrepo/.git/HEAD") do + it { should contain 'ref: refs/heads/master' } + end + + end + context 'using git protocol' do before(:all) do on(host,apply_manifest("file {'#{tmpdir}/testrepo': ensure => directory, purge => true, recurse => true, recurselimit => 1, force => true; }")) -- cgit v1.2.3