summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-07-15 16:03:44 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-07-24 09:49:05 +1000
commit935c46351f6f6730569c50fd0c59e8157486b827 (patch)
tree80642f5693f3cd3ef7ae42e84b1ec79a037d603e /test
parentd95b687045920c7d7fed5da1fe03b0feac86327a (diff)
downloadpuppet-935c46351f6f6730569c50fd0c59e8157486b827.tar.gz
puppet-935c46351f6f6730569c50fd0c59e8157486b827.tar.xz
puppet-935c46351f6f6730569c50fd0c59e8157486b827.zip
Fixing #2403 - provider specificity is richer and better
We have extended the concept of provider specificity so it now includes both specified defaults and class depth, so: * We are much more likely to choose the correct provider; e.g., 'init' will be chosen over 'base' * We're much less likely to print this warning, because it's only printed when provider specificities are equal which is much rarer lib/puppet/provider.rb | 4 ++-- lib/puppet/type.rb | 4 ++-- spec/unit/type.rb | 17 +++++++++++++++++ test/ral/manager/type.rb | 22 ---------------------- 4 files changed, 21 insertions(+), 26 deletions(-) Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/manager/type.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/test/ral/manager/type.rb b/test/ral/manager/type.rb
index 2624e26ea..30da6d114 100755
--- a/test/ral/manager/type.rb
+++ b/test/ral/manager/type.rb
@@ -307,28 +307,6 @@ class TestType < Test::Unit::TestCase
assert_equal(path, file[:name], "Did not get correct name")
end
- # Make sure default providers behave correctly
- def test_defaultproviders
- # Make a fake type
- type = Puppet::Type.newtype(:defaultprovidertest) do
- newparam(:name) do end
- end
-
- basic = type.provide(:basic) do
- defaultfor :operatingsystem => :somethingelse,
- :operatingsystemrelease => :yayness
- end
-
- assert_equal(basic, type.defaultprovider)
- type.defaultprovider = nil
-
- greater = type.provide(:greater) do
- defaultfor :operatingsystem => Facter.value("operatingsystem")
- end
-
- assert_equal(greater, type.defaultprovider)
- end
-
# Make sure that we can have multiple non-isomorphic objects with the same name,
# but not with isomorphic objects.
def test_isomorphic_names