summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/mount/mount.rb2
-rw-r--r--spec/unit/provider/mount/mount_spec.rb16
2 files changed, 7 insertions, 11 deletions
diff --git a/lib/chef/provider/mount/mount.rb b/lib/chef/provider/mount/mount.rb
index 2d4a5aadef..c1d4fb2223 100644
--- a/lib/chef/provider/mount/mount.rb
+++ b/lib/chef/provider/mount/mount.rb
@@ -191,7 +191,7 @@ class Chef
def device_should_exist?
( @new_resource.device != "none" ) &&
( not network_device? ) &&
- ( not %w[ tmpfs fuse ].include? @new_resource.fstype )
+ ( not %w[ cgroup tmpfs fuse ].include? @new_resource.fstype )
end
private
diff --git a/spec/unit/provider/mount/mount_spec.rb b/spec/unit/provider/mount/mount_spec.rb
index d6f71bc613..abab7640c0 100644
--- a/spec/unit/provider/mount/mount_spec.rb
+++ b/spec/unit/provider/mount/mount_spec.rb
@@ -107,16 +107,12 @@ describe Chef::Provider::Mount::Mount do
lambda { @provider.load_current_resource();@provider.mountable? }.should raise_error(Chef::Exceptions::Mount)
end
- it "does not expect the device to exist for tmpfs" do
- @new_resource.fstype("tmpfs")
- @new_resource.device("whatever")
- lambda { @provider.load_current_resource();@provider.mountable? }.should_not raise_error
- end
-
- it "does not expect the device to exist for Fuse filesystems" do
- @new_resource.fstype("fuse")
- @new_resource.device("nilfs#xxx")
- lambda { @provider.load_current_resource();@provider.mountable? }.should_not raise_error
+ [ "tmpfs", "fuse", "cgroup" ].each do |fstype|
+ it "does not expect the device to exist for #{fstype}" do
+ @new_resource.fstype(fstype)
+ @new_resource.device("whatever")
+ lambda { @provider.load_current_resource();@provider.mountable? }.should_not raise_error
+ end
end
it "does not expect the device to exist if it's none" do