summaryrefslogtreecommitdiff
path: root/spec/acceptance
diff options
context:
space:
mode:
authorJohn Duarte <john.duarte@puppetlabs.com>2014-05-05 21:04:24 -0700
committerJohn Duarte <john.duarte@puppetlabs.com>2014-05-18 11:38:18 -0700
commit3c41c39e19b63d76001fe980a2b8281221e6175e (patch)
tree842eba92084f8600ca1f2c77056be596a9ca8282 /spec/acceptance
parent30aa7738146921f0fb34e61ace82eed8dae1fc97 (diff)
Add test for git clone using file path
Diffstat (limited to 'spec/acceptance')
-rw-r--r--spec/acceptance/git_clone_protocols_spec.rb25
1 files changed, 25 insertions, 0 deletions
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; }"))