diff options
author | Luke Kanies <luke@puppetlabs.com> | 2010-04-12 15:09:58 -0700 |
---|---|---|
committer | Luke Kanies <luke@puppetlabs.com> | 2010-04-12 15:09:58 -0700 |
commit | 8c31ebe7f2da5d5f246d9994b0f84636009e1a70 (patch) | |
tree | f49364b8eae73940e3e660a64a6ca45dc1c1aa57 | |
parent | aee9c294035efd053d2de131a75867ae6bc4ddf7 (diff) | |
download | puppet-8c31ebe7f2da5d5f246d9994b0f84636009e1a70.tar.gz puppet-8c31ebe7f2da5d5f246d9994b0f84636009e1a70.tar.xz puppet-8c31ebe7f2da5d5f246d9994b0f84636009e1a70.zip |
Removing obsolete tests
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
-rwxr-xr-x | test/ral/manager/type.rb | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/test/ral/manager/type.rb b/test/ral/manager/type.rb index e3cc32376..99a91cff5 100755 --- a/test/ral/manager/type.rb +++ b/test/ral/manager/type.rb @@ -2,8 +2,8 @@ require File.dirname(__FILE__) + '/../../lib/puppettest' -require 'puppettest' require 'mocha' +require 'puppettest' class TestType < Test::Unit::TestCase include PuppetTest @@ -297,17 +297,6 @@ class TestType < Test::Unit::TestCase assert_equal((tags << "file").sort, obj.tags.sort) end - def disabled_test_list - Puppet::Type.loadall - - Puppet::Type.eachtype do |type| - next if type.name == :symlink - next if type.name == :component - next if type.name == :tidy - assert(type.respond_to?(:list), "%s does not respond to list" % type.name) - end - end - def test_to_hash file = Puppet::Type.newfile :path => tempfile(), :owner => "luke", :recurse => true, :loglevel => "warning" @@ -332,58 +321,6 @@ class TestType < Test::Unit::TestCase assert_equal("Exec[yay]", exec.ref) end - def test_path - config = mk_catalog - - # Check that our paths are built correctly. Just pick a random, "normal" type. - type = Puppet::Type.type(:exec) - mk = Proc.new do |i, hash| - hash[:title] = "exec%s" % i - hash[:command] = "/bin/echo %s" % i - if parent = hash[:parent] - hash.delete(:parent) - end - res = type.create(hash) - config.add_resource res - if parent - config.add_edge(parent, res) - end - res - end - - exec = mk.call(1, {}) - - assert_equal("/Exec[exec1]", exec.path) - - comp = Puppet::Type.newcomponent :title => "My[component]", :type => "Yay" - config.add_resource comp - - exec = mk.call(2, :parent => comp) - - assert_equal("/My[component]/Exec[exec2]", exec.path) - - comp = Puppet::Type.newcomponent :name => "Other[thing]" - config.add_resource comp - exec = mk.call(3, :parent => comp) - assert_equal("/Other[thing]/Exec[exec3]", exec.path) - - comp = Puppet::Type.newcomponent :type => "server", :name => "server" - config.add_resource comp - exec = mk.call(4, :parent => comp) - assert_equal("/server/Exec[exec4]", exec.path) - - comp = Puppet::Type.newcomponent :type => "whatever", :name => "class[main]" - config.add_resource comp - exec = mk.call(5, :parent => comp) - assert_equal("//Exec[exec5]", exec.path) - - newcomp = Puppet::Type.newcomponent :type => "yay", :name => "Good[bad]" - config.add_resource newcomp - config.add_edge comp, newcomp - exec = mk.call(6, :parent => newcomp) - assert_equal("//Good[bad]/Exec[exec6]", exec.path) - end - # Partially test #704, but also cover the rest of the schedule management bases. def test_schedule schedule = Puppet::Type.type(:schedule).new(:name => "maint") |