summaryrefslogtreecommitdiff
path: root/spec/acceptance
diff options
context:
space:
mode:
authorJT (Jonny) <jonathan.tripathy@puppetlabs.com>2015-06-19 11:12:54 +0100
committerJT (Jonny) <jonathan.tripathy@puppetlabs.com>2015-06-19 11:12:54 +0100
commit4840ffbfbe2db1403979eac2e539a605917470f9 (patch)
tree3433c891ae6cfccfc9afc2f7141a9f3fb4fcf237 /spec/acceptance
parent11b91fbaa94242691ff00913a025425f5488ea33 (diff)
parent8d3e112fec38627096e7d18d796e3abeaf677d66 (diff)
downloadpuppet-vcsrepo-4840ffbfbe2db1403979eac2e539a605917470f9.tar.gz
puppet-vcsrepo-4840ffbfbe2db1403979eac2e539a605917470f9.tar.bz2
Merge pull request #252 from DavidS/add-https-clone-test
acceptance: Add a test verifying anonymous https cloning
Diffstat (limited to 'spec/acceptance')
-rw-r--r--spec/acceptance/clone_repo_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/acceptance/clone_repo_spec.rb b/spec/acceptance/clone_repo_spec.rb
index 2cca061..c234550 100644
--- a/spec/acceptance/clone_repo_spec.rb
+++ b/spec/acceptance/clone_repo_spec.rb
@@ -38,6 +38,30 @@ describe 'clones a remote repo' do
end
end
+ context 'using a https source on github' do
+ it 'clones a repo' do
+ pp = <<-EOS
+ vcsrepo { "#{tmpdir}/httpstestrepo":
+ ensure => present,
+ provider => git,
+ source => "https://github.com/puppetlabs/puppetlabs-vcsrepo.git",
+ }
+ EOS
+
+ # Run it twice and test for idempotency
+ apply_manifest(pp, :catch_failures => true)
+ apply_manifest(pp, :catch_changes => true)
+ end
+
+ describe file("#{tmpdir}/httpstestrepo/.git") do
+ it { is_expected.to be_directory }
+ end
+
+ describe file("#{tmpdir}/httpstestrepo/.git/HEAD") do
+ it { is_expected.to contain 'ref: refs/heads/master' }
+ end
+ end
+
context 'using a commit SHA' do
let (:sha) do
shell("git --git-dir=#{tmpdir}/testrepo.git rev-list HEAD | tail -1").stdout.chomp