summaryrefslogtreecommitdiffstats
path: root/test/ral/manager
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-09-22 14:25:17 -0500
committerLuke Kanies <luke@madstop.com>2007-09-22 14:25:17 -0500
commit86dde63473d29c45d8698ce4edd53c820a621362 (patch)
tree5fe7d7095d1375cbbcb22e7cd6ac0a2071f6ca80 /test/ral/manager
parent60cd6a73b2b0cb7b26b091d4214c66eb5ed3b0ad (diff)
downloadpuppet-86dde63473d29c45d8698ce4edd53c820a621362.tar.gz
puppet-86dde63473d29c45d8698ce4edd53c820a621362.tar.xz
puppet-86dde63473d29c45d8698ce4edd53c820a621362.zip
All tests now pass in this configuration branch, which means
it's time to merge it back into the indirection branch. Considering that this work was what drove me to create the indirection branch in the first place, i should now be able to merge both back in the master branch.
Diffstat (limited to 'test/ral/manager')
-rwxr-xr-xtest/ral/manager/type.rb70
1 files changed, 0 insertions, 70 deletions
diff --git a/test/ral/manager/type.rb b/test/ral/manager/type.rb
index 4f2db4805..b2c111e60 100755
--- a/test/ral/manager/type.rb
+++ b/test/ral/manager/type.rb
@@ -246,76 +246,6 @@ class TestType < Test::Unit::TestCase
# and make sure managed objects start with them
assert(user.property(:ensure), "User did not get an ensure property")
end
-
- # Make sure removal works
- def test_remove
- objects = {}
- top = Puppet.type(:component).create(:name => "top")
- objects[top.class] = top
-
- base = tempfile()
-
- # now make a two-tier, 5 piece tree
- %w{a b}.each do |letter|
- name = "comp%s" % letter
- comp = Puppet.type(:component).create(:name => name)
- top.push comp
- objects[comp.class] = comp
-
- 5.times do |i|
- file = base + letter + i.to_s
-
- obj = Puppet.type(:file).create(:name => file, :ensure => "file")
-
- comp.push obj
- objects[obj.class] = obj
- end
- end
-
- assert_nothing_raised do
- top.remove
- end
-
- objects.each do |klass, obj|
- assert_nil(klass[obj.name], "object %s was not removed" % obj.name)
- end
- end
-
- # Verify that objects can't be their own children.
- def test_object_recursion
- comp = Puppet.type(:component).create(:name => "top")
-
- file = Puppet.type(:component).create(:name => "middle")
-
- assert_raise(Puppet::DevError) do
- comp.push(comp)
- end
-
- assert_raise(Puppet::DevError) do
- file.push(file)
- end
-
- assert_raise(Puppet::DevError) do
- comp.parent = comp
- end
-
- assert_raise(Puppet::DevError) do
- file.parent = file
- end
-
- assert_nothing_raised {
- comp.push(file)
- }
-
- assert_raise(Puppet::DevError) do
- file.push(comp)
- end
-
- assert_raise(Puppet::DevError) do
- comp.parent = file
- end
- end
-
def test_newtype_methods
assert_nothing_raised {
Puppet::Type.newtype(:mytype) do