diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-06 17:09:23 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-06 17:09:23 +0000 |
| commit | 3a024d7600a7e74394da54b47084397cbcbae7aa (patch) | |
| tree | e2663be8a66c8d250c789b9a1bd50d6de39a7d6f | |
| parent | 71346e93d765af1aa61b8826dbb897e41ad38e85 (diff) | |
| download | puppet-3a024d7600a7e74394da54b47084397cbcbae7aa.tar.gz puppet-3a024d7600a7e74394da54b47084397cbcbae7aa.tar.xz puppet-3a024d7600a7e74394da54b47084397cbcbae7aa.zip | |
Removing the default value for :ensure on mounts.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2164 980ebf18-57e1-0310-9a29-db15c13687c0
| -rwxr-xr-x | lib/puppet/type/mount.rb | 8 | ||||
| -rwxr-xr-x | test/types/mount.rb | 11 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/puppet/type/mount.rb b/lib/puppet/type/mount.rb index df0beca6f..1f8147b77 100755 --- a/lib/puppet/type/mount.rb +++ b/lib/puppet/type/mount.rb @@ -43,14 +43,6 @@ module Puppet provider.mount end - defaultto do - if @parent.managed? - :mounted - else - nil - end - end - def retrieve if provider.mounted? @is = :mounted diff --git a/test/types/mount.rb b/test/types/mount.rb index 9bdf599cd..d153d3482 100755 --- a/test/types/mount.rb +++ b/test/types/mount.rb @@ -108,6 +108,7 @@ class TestMounts < Test::Unit::TestCase def test_simplemount mount = mkmount + mount[:ensure] = :mounted assert_apply(mount) mount.send(:states).each do |state| @@ -118,8 +119,6 @@ class TestMounts < Test::Unit::TestCase assert_nothing_raised { mount.retrieve } - assert_equal(:mounted, mount.is(:ensure)) - # Now modify a field mount[:dump] = 2 mount[:options] = "defaults,ro" @@ -269,6 +268,7 @@ class TestMounts < Test::Unit::TestCase def test_refresh mount = mkmount + mount[:ensure] = :mounted remounted = false mount.provider.meta_def(:remount) do @@ -297,6 +297,13 @@ class TestMounts < Test::Unit::TestCase assert(! remounted, "remounted even though not supposed to be mounted") end + + def test_no_default_for_ensure + mount = mkmount + mount.finish + + assert_nil(mount.should(:ensure), "Found default for ensure") + end end # $Id$ |
