diff options
author | David Schmitt <david.schmitt@puppetlabs.com> | 2015-05-29 13:00:42 +0100 |
---|---|---|
committer | David Schmitt <david.schmitt@puppetlabs.com> | 2015-05-29 13:00:42 +0100 |
commit | 8d3e112fec38627096e7d18d796e3abeaf677d66 (patch) | |
tree | 5615a6446fa8f6b965056113f243e43405d75e4d /spec | |
parent | 18b91b2f51a1cd8cd6911bd981e4629dd0d407e8 (diff) | |
download | puppet-vcsrepo-8d3e112fec38627096e7d18d796e3abeaf677d66.tar.gz puppet-vcsrepo-8d3e112fec38627096e7d18d796e3abeaf677d66.tar.bz2 |
acceptance: Add a test verifying anonymous https cloning
In MODULES-891 the question arose whether https sources are supported.
This test shows that it works.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/acceptance/clone_repo_spec.rb | 24 |
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 |