summaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-08 17:20:00 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-06-08 17:20:00 +0000
commit73502a7cac443890792ffd9d3bb4778a90413e61 (patch)
tree77ba7aa23d82a21b4bdfb9c135ceba086795b449 /test/lib
parentbf82d51737df7509faf4601dbbf15b265bd9da3d (diff)
downloadpuppet-73502a7cac443890792ffd9d3bb4778a90413e61.tar.gz
puppet-73502a7cac443890792ffd9d3bb4778a90413e61.tar.xz
puppet-73502a7cac443890792ffd9d3bb4778a90413e61.zip
Finishing off the type/provider interface work, including adding package prefetch for all packages. The only not-done one is yum -- prefetch is set up for rpm, but not yum. We need to modify prefetching so that it also prefetches latest information, to avoid having to run yum so many times.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2555 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/puppettest/fakes.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lib/puppettest/fakes.rb b/test/lib/puppettest/fakes.rb
index 3c19d6c43..df1c3732e 100644
--- a/test/lib/puppettest/fakes.rb
+++ b/test/lib/puppettest/fakes.rb
@@ -114,6 +114,10 @@ module PuppetTest
end
end
+ def self.source
+ self.name
+ end
+
def self.supports_parameter?(param)
true
end
@@ -129,6 +133,13 @@ module PuppetTest
def initialize(resource)
@resource = resource
end
+
+ def properties
+ self.class.resource_type.validproperties.inject({}) do |props, name|
+ props[name] = self.send(name) || :absent
+ props
+ end
+ end
end
class FakeParsedProvider < FakeProvider