summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider
diff options
context:
space:
mode:
authorHunter Haugen <hunter@puppetlabs.com>2014-05-20 18:15:03 -0700
committerHunter Haugen <hunter@puppetlabs.com>2014-05-21 16:49:26 -0700
commit0d9e938e92a25673c3712866e2d2108a255b67d5 (patch)
tree9b183ce838cb37823ec525407050a362b1eedf1c /spec/unit/puppet/provider
parent93e0c80f38efbd1317fc3b71218cc7fd047d639a (diff)
downloadpuppet-vcsrepo-0d9e938e92a25673c3712866e2d2108a255b67d5.tar.gz
puppet-vcsrepo-0d9e938e92a25673c3712866e2d2108a255b67d5.tar.bz2
Update specs and fix FM-1361
- Add install.rb for pre-suite - Add catches for failures/changes to manifest application - Correct root ssh key copying - Add sleeps for killing processes releasing ports - Fix FM-1361
Diffstat (limited to 'spec/unit/puppet/provider')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index daec038..a753610 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -90,10 +90,9 @@ branches
context "with an ensure of bare" do
context "with revision" do
- it "should just execute 'git clone --bare'" do
+ it "should raise an error" do
resource[:ensure] = :bare
- provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path))
- provider.create
+ expect { provider.create }.to raise_error Puppet::Error, /cannot set a revision.+bare/i
end
end
context "without revision" do
@@ -144,6 +143,7 @@ branches
it "should execute 'git init --bare'" do
resource[:ensure] = :bare
resource.delete(:source)
+ resource.delete(:revision)
expects_chdir
expects_mkdir
expects_directory?(false)
@@ -157,6 +157,7 @@ branches
it "should convert it to a bare repository" do
resource[:ensure] = :bare
resource.delete(:source)
+ resource.delete(:revision)
provider.expects(:working_copy_exists?).returns(true)
provider.expects(:convert_working_copy_to_bare)
provider.create