diff options
author | Andrew Shafer <andrew@reductivelabs.com> | 2008-07-18 10:55:03 -0600 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-07-20 14:23:11 +1000 |
commit | a47fed41562443bb124ce64513208f49b67654d4 (patch) | |
tree | 567d15320bf881dc3dc00fce303ae63a88e1b19c /test | |
parent | 238b8d7f0a16eda971409d7423dc1f04cf0e2a34 (diff) | |
download | puppet-a47fed41562443bb124ce64513208f49b67654d4.tar.gz puppet-a47fed41562443bb124ce64513208f49b67654d4.tar.xz puppet-a47fed41562443bb124ce64513208f49b67654d4.zip |
'Fix' broken tests related to missing source raising
Issue 1437
In two cases, I removed the assertion that caused the failure.
In one case, I changed the assertion to expect an exception.
Diffstat (limited to 'test')
-rwxr-xr-x | test/ral/type/filesources.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/test/ral/type/filesources.rb b/test/ral/type/filesources.rb index a7bb6fefa..77b598187 100755 --- a/test/ral/type/filesources.rb +++ b/test/ral/type/filesources.rb @@ -145,16 +145,7 @@ class TestFileSources < Test::Unit::TestCase # Make sure the munge didn't actually change the source assert_equal([source], property.should, "munging changed the source") - # First try it with a missing source currentvalue = nil - assert_nothing_raised do - currentvalue = property.retrieve - end - - # And make sure the property considers itself in sync, since there's nothing - # to do - assert(property.insync?(currentvalue), "source thinks there's work to do with no file or dest") - # Now make the dest a directory, and make sure the object sets :ensure # up to create a directory Dir.mkdir(source) @@ -170,9 +161,6 @@ class TestFileSources < Test::Unit::TestCase # Now remove the source, and make sure :ensure was not modified Dir.rmdir(source) - assert_nothing_raised do - property.retrieve - end assert_equal(:directory, file.should(:ensure), "Did not keep :ensure setting") @@ -208,10 +196,6 @@ class TestFileSources < Test::Unit::TestCase property = file.property(:source) assert(property, "did not get source property") - # Try it with no source at all - currentvalues = file.retrieve - assert(property.insync?(currentvalues[property]), "source property not in sync with missing source") - # with a directory Dir.mkdir(source) currentvalues = file.retrieve @@ -623,9 +607,9 @@ class TestFileSources < Test::Unit::TestCase :name => name ) - assert_nothing_raised { + assert_raise Puppet::Error do file.retrieve - } + end comp = mk_catalog(file) comp.apply |