summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-06-05 09:58:13 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-06-05 09:58:13 -0700
commit74a37cc3ac7220b09f25921d0473abbfca779899 (patch)
tree1480a821e470ee46df49fcd79c7adce196095ebd
parentf367d9a35edc6ec5f0ab2955bba364f0bb2f7fdf (diff)
downloadchef-74a37cc3ac7220b09f25921d0473abbfca779899.tar.gz
solaris does not support uuid types
changed this so it raises in the resource rather than in the provider, so its blowing up on solaris when we try to unit test now.
-rw-r--r--spec/unit/provider/mount/mount_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/unit/provider/mount/mount_spec.rb b/spec/unit/provider/mount/mount_spec.rb
index ea4542afa5..e25aa5858f 100644
--- a/spec/unit/provider/mount/mount_spec.rb
+++ b/spec/unit/provider/mount/mount_spec.rb
@@ -19,6 +19,10 @@
require 'spec_helper'
require 'ostruct'
+exclude_flag = ['solaris2'].include?(ohai[:platform])
+
+describe Chef::Resource::Mount, :requires_root, :external => include_flag do
+
describe Chef::Provider::Mount::Mount do
before(:each) do
@node = Chef::Node.new
@@ -53,7 +57,7 @@ describe Chef::Provider::Mount::Mount do
@provider.current_resource.device.should == '/dev/sdz1'
end
- it "should accecpt device_type :uuid" do
+ it "should accecpt device_type :uuid", external => exclude_flag do
@new_resource.device_type :uuid
@new_resource.device "d21afe51-a0fe-4dc6-9152-ac733763ae0a"
@stdout_findfs = double("STDOUT", :first => "/dev/sdz1")
@@ -92,7 +96,7 @@ describe Chef::Provider::Mount::Mount do
@provider.load_current_resource
end
- it "should raise an error if the mount device (uuid) does not exist" do
+ it "should raise an error if the mount device (uuid) does not exist", external => exclude_flag do
@new_resource.device_type :uuid
@new_resource.device "d21afe51-a0fe-4dc6-9152-ac733763ae0a"
status_findfs = double("Status", :exitstatus => 1)
@@ -304,7 +308,7 @@ describe Chef::Provider::Mount::Mount do
@provider.mount_fs()
end
- it "should mount the filesystem specified by uuid" do
+ it "should mount the filesystem specified by uuid", external => exclude_flag do
@new_resource.device "d21afe51-a0fe-4dc6-9152-ac733763ae0a"
@new_resource.device_type :uuid
@stdout_findfs = double("STDOUT", :first => "/dev/sdz1")