summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-03-11 23:52:53 -0500
committerLuke Kanies <luke@madstop.com>2009-03-11 23:52:53 -0500
commit88aa1bc2cfef4517fca9e467c86f70ae356be883 (patch)
treee3ab7739abe41c9110004abd41d1c8618b2c1753 /test
parentf8dea989e3f5bd7d3d823a6c3dc3cf76cd5cba4e (diff)
downloadpuppet-88aa1bc2cfef4517fca9e467c86f70ae356be883.tar.gz
puppet-88aa1bc2cfef4517fca9e467c86f70ae356be883.tar.xz
puppet-88aa1bc2cfef4517fca9e467c86f70ae356be883.zip
Fixing tests broken in previous commits
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/snippets.rb4
-rwxr-xr-xtest/network/client/resource.rb15
2 files changed, 5 insertions, 14 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb
index a1d0f5d4f..dfd4950e7 100755
--- a/test/language/snippets.rb
+++ b/test/language/snippets.rb
@@ -358,7 +358,7 @@ class TestSnippets < Test::Unit::TestCase
}.each { |count, str|
path = "/tmp/singlequote%s" % count
assert_file(path)
- assert_equal(str, @catalog.resource(:file, path).should(:content))
+ assert_equal(str, @catalog.resource(:file, path).parameter(:content).actual_content)
}
end
@@ -403,7 +403,7 @@ class TestSnippets < Test::Unit::TestCase
path = "/tmp/multisubtest"
assert_file(path)
file = @catalog.resource(:file, path)
- assert_equal("sub2", file.should(:content), "sub2 did not override content")
+ assert_equal("{md5}5fbef65269a99bddc2106251dd89b1dc", file.should(:content), "sub2 did not override content")
assert_mode_equal(0755, path)
end
diff --git a/test/network/client/resource.rb b/test/network/client/resource.rb
index 3ad9282bb..ba84fc27e 100755
--- a/test/network/client/resource.rb
+++ b/test/network/client/resource.rb
@@ -35,29 +35,20 @@ class TestResourceClient < Test::Unit::TestCase
client = mkclient()
# Test describing
- tresource = nil
- assert_nothing_raised {
- tresource = client.describe("file", file)
- }
+ tresource = client.describe("file", file)
assert(tresource, "Did not get response")
assert_instance_of(Puppet::TransObject, tresource)
- resource = nil
- assert_nothing_raised {
- resource = tresource.to_ral
- }
+ resource = tresource.to_ral
assert_events([], resource)
File.unlink(file)
assert_events([:file_created], resource)
File.unlink(file)
# Now test applying
- result = nil
- assert_nothing_raised {
- result = client.apply(tresource)
- }
+ result = client.apply(tresource)
assert(FileTest.exists?(file), "File was not created on apply")
end
end