summaryrefslogtreecommitdiffstats
path: root/spec/unit/network/client
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-16 10:26:38 -0500
committerLuke Kanies <luke@madstop.com>2009-06-16 10:26:38 -0500
commit4036de9591bc1ab19df3a0c3bae4567240a4ec85 (patch)
tree9b9a9c58242851a184f85cbcf159950dbb5fc732 /spec/unit/network/client
parented876e0264bbb1ba86bc302d517d8f48f388da3e (diff)
downloadpuppet-4036de9591bc1ab19df3a0c3bae4567240a4ec85.tar.gz
puppet-4036de9591bc1ab19df3a0c3bae4567240a4ec85.tar.xz
puppet-4036de9591bc1ab19df3a0c3bae4567240a4ec85.zip
Fixing #2094 - filebucket failures are clearer now
We just add a bit of information to the exception. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/network/client')
-rwxr-xr-xspec/unit/network/client/dipper.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/network/client/dipper.rb b/spec/unit/network/client/dipper.rb
new file mode 100755
index 000000000..d1631fbb5
--- /dev/null
+++ b/spec/unit/network/client/dipper.rb
@@ -0,0 +1,16 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../../spec_helper'
+
+describe Puppet::Network::Client.dipper do
+ it "should fail in an informative way when there are failures backing up to the server" do
+ FileTest.stubs(:exists?).returns true
+ File.stubs(:read).returns "content"
+
+ @dipper = Puppet::Network::Client::Dipper.new(:Path => "/my/bucket")
+
+ @dipper.driver.expects(:addfile).raises ArgumentError
+
+ lambda { @dipper.backup("/my/file") }.should raise_error(Puppet::Error)
+ end
+end