summaryrefslogtreecommitdiffstats
path: root/ext/puppet-test
diff options
context:
space:
mode:
Diffstat (limited to 'ext/puppet-test')
-rwxr-xr-xext/puppet-test24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/puppet-test b/ext/puppet-test
index 53333076f..61397e74b 100755
--- a/ext/puppet-test
+++ b/ext/puppet-test
@@ -229,6 +229,30 @@ Suite.new :local_catalog, "Local catalog handling" do
end
end
+Suite.new :resource_type, "Managing resource types" do
+ newtest :find, "Find a type" do
+ Puppet::Resource::Type.terminus_class = :parser
+ ARGV.each do |name|
+ json = Puppet::Resource::Type.find(name).to_pson
+ data = PSON.parse(json)
+ p Puppet::Resource::Type.from_pson(data)
+ end
+ end
+
+ newtest :search_types, "Find all types" do
+ Puppet::Resource::Type.terminus_class = :rest
+ result = Puppet::Resource::Type.search("*")
+ result.each { |r| p r }
+ end
+
+ newtest :restful_type, "Find a type and return it via REST" do
+ Puppet::Resource::Type.terminus_class = :rest
+ ARGV.each do |name|
+ p Puppet::Resource::Type.find(name)
+ end
+ end
+end
+
Suite.new :remote_catalog, "Remote catalog handling" do
def prepare
$args[:cache] = false