diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-19 22:12:51 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-19 22:12:51 +0000 |
| commit | 3f1c865eab38e6d41ff67de6730ca817ed09a02d (patch) | |
| tree | a756357fdc93be5c1ea98e8f2a2979e18df2bc80 /test | |
| parent | 55014a263da5dce5b4014babbda2ff412f6f82d5 (diff) | |
Fixing #725. I was apparently not deleting the alias I was creating to the components.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2718 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/ral/manager/instances.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ral/manager/instances.rb b/test/ral/manager/instances.rb index 759a5884a..e7a43488a 100755 --- a/test/ral/manager/instances.rb +++ b/test/ral/manager/instances.rb @@ -89,6 +89,21 @@ class TestTypeInstances < Test::Unit::TestCase # Now make sure the resources have an 'ensure' property to go with the value in the provider assert(resources[:one].send(:instance_variable_get, "@parameters").include?(:ensure), "Did not create ensure property") end + + # Make sure resources are entirely deleted. + def test_delete + aliases = %w{one} + obj = @type.create(:name => "testing", :alias => "two") + aliases << "two" + + @type.alias("two", obj) + + obj.remove + assert_nil(@type["testing"], "Object was not removed from objects hash") + assert_nil(@type["one"], "Object's alias was not removed") + assert_nil(@type["two"], "Object's second alias was not removed") + + end end # $Id$ |
