diff options
| author | Luke Kanies <luke@madstop.com> | 2008-11-08 12:52:52 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-11-08 12:52:52 -0600 |
| commit | fe0b818c411344da894dc8d26787db8602f68c7a (patch) | |
| tree | 0369146363b71d86c45a4b564b13e70b622f854f /test/network/client | |
| parent | eed37f7133a33577d1ebc8441db6090fb4c0b7f8 (diff) | |
| download | puppet-fe0b818c411344da894dc8d26787db8602f68c7a.tar.gz puppet-fe0b818c411344da894dc8d26787db8602f68c7a.tar.xz puppet-fe0b818c411344da894dc8d26787db8602f68c7a.zip | |
Fixing tests broken by fileserving and other refactoring.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test/network/client')
| -rwxr-xr-x | test/network/client/resource.rb | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/test/network/client/resource.rb b/test/network/client/resource.rb index f3c564d9d..6a2e52471 100755 --- a/test/network/client/resource.rb +++ b/test/network/client/resource.rb @@ -29,28 +29,29 @@ class TestResourceClient < Test::Unit::TestCase client = mkclient() # Test describing - tobj = nil + tresource = nil assert_nothing_raised { - tobj = client.describe("file", file) + tresource = client.describe("file", file) } - assert(tobj, "Did not get response") + assert(tresource, "Did not get response") - assert_instance_of(Puppet::TransObject, tobj) + assert_instance_of(Puppet::TransObject, tresource) - obj = nil + resource = nil assert_nothing_raised { - obj = tobj.to_type + resource = tresource.to_type } - assert_events([], obj) + assert_events([], resource) + p resource.instance_variable_get("@stat") File.unlink(file) - assert_events([:file_created], obj) + assert_events([:file_created], resource) File.unlink(file) # Now test applying result = nil assert_nothing_raised { - result = client.apply(tobj) + result = client.apply(tresource) } assert(FileTest.exists?(file), "File was not created on apply") @@ -63,20 +64,20 @@ class TestResourceClient < Test::Unit::TestCase assert_instance_of(Puppet::TransBucket, list) count = 0 - list.each do |tobj| + list.each do |tresource| break if count > 3 - assert_instance_of(Puppet::TransObject, tobj) + assert_instance_of(Puppet::TransObject, tresource) - tobj2 = nil + tresource2 = nil assert_nothing_raised { - tobj2 = client.describe(tobj.type, tobj.name) + tresource2 = client.describe(tresource.type, tresource.name) } - obj = nil + resource = nil assert_nothing_raised { - obj = tobj2.to_type + resource = tresource2.to_type } - assert_events([], obj) + assert_events([], resource) count += 1 end |
