diff options
| author | Rick Bradley <rick@rickbradley.com> | 2007-10-09 11:29:13 -0500 |
|---|---|---|
| committer | Rick Bradley <rick@rickbradley.com> | 2007-10-09 11:29:13 -0500 |
| commit | fdfe807bd986a2b27f0dfd0cecde1a33aeee309b (patch) | |
| tree | 0b6375bdefa041a7d4fbab9745ed084fb025bc30 /test/language | |
| parent | 42b98562b5237797e1a51fdcdd57aa3c6825b404 (diff) | |
| parent | 01f132d8b88467dfd314ad355f1cdf9f546945b3 (diff) | |
| download | puppet-fdfe807bd986a2b27f0dfd0cecde1a33aeee309b.tar.gz puppet-fdfe807bd986a2b27f0dfd0cecde1a33aeee309b.tar.xz puppet-fdfe807bd986a2b27f0dfd0cecde1a33aeee309b.zip | |
Merge branch 'master' of git://reductivelabs.com/puppet into routing
Diffstat (limited to 'test/language')
| -rwxr-xr-x | test/language/snippets.rb | 4 | ||||
| -rwxr-xr-x | test/language/transportable.rb | 34 |
2 files changed, 9 insertions, 29 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb index cc3859552..58a6e7f89 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -202,7 +202,7 @@ class TestSnippets < Test::Unit::TestCase assert_nothing_raised { assert_equal( - "//testing/component[componentname]/File[/tmp/classtest]", + "//testing/Mytype[componentname]/File[/tmp/classtest]", file.path) } end @@ -466,7 +466,7 @@ class TestSnippets < Test::Unit::TestCase } assert_nothing_raised("Could not convert configuration") { - config = config.extract_to_transportable.to_configuration + config = config.to_ral } Puppet::Type.eachtype { |type| diff --git a/test/language/transportable.rb b/test/language/transportable.rb index 31931c937..4e4573e0b 100755 --- a/test/language/transportable.rb +++ b/test/language/transportable.rb @@ -47,37 +47,17 @@ class TestTransportable < Test::Unit::TestCase assert(newobj.type, "Bucket has no type") end - # Verify that we correctly strip out collectable objects, since they should - # not be sent to the client. - def test_collectstrip - top = mk_transtree do |object, depth, width| - if width % 2 == 1 - object.collectable = true - end - end - - assert(top.flatten.find_all { |o| o.collectable }.length > 0, - "Could not find any collectable objects") - - # Now strip out the collectable objects - top.collectstrip! - - # And make sure they're actually gone - assert_equal(0, top.flatten.find_all { |o| o.collectable }.length, - "Still found collectable objects") - end - # Make sure our 'delve' command is working def test_delve top = mk_transtree do |object, depth, width| if width % 2 == 1 - object.collectable = true + object.file = :funtest end end objects = [] buckets = [] - collectable = [] + found = [] count = 0 assert_nothing_raised { @@ -87,8 +67,8 @@ class TestTransportable < Test::Unit::TestCase buckets << object else objects << object - if object.collectable - collectable << object + if object.file == :funtest + found << object end end end @@ -98,9 +78,9 @@ class TestTransportable < Test::Unit::TestCase assert(objects.include?(obj), "Missing obj %s[%s]" % [obj.type, obj.name]) end - assert_equal(collectable.length, - top.flatten.find_all { |o| o.collectable }.length, - "Found incorrect number of collectable objects") + assert_equal(found.length, + top.flatten.find_all { |o| o.file == :funtest }.length, + "Found incorrect number of objects") end end |
