diff options
author | Luke Kanies <luke@madstop.com> | 2005-06-01 22:20:10 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-06-01 22:20:10 +0000 |
commit | 0dad57a29e84d510a9d530c79b12aa4fba9f334f (patch) | |
tree | ab2cb59d48209d5c00ddddadd1568730a3c31d76 /test | |
parent | d1f2187c26358288c3a0986b752ffdf5e7b87388 (diff) | |
download | puppet-0dad57a29e84d510a9d530c79b12aa4fba9f334f.tar.gz puppet-0dad57a29e84d510a9d530c79b12aa4fba9f334f.tar.xz puppet-0dad57a29e84d510a9d530c79b12aa4fba9f334f.zip |
md5 summing now works, all the way through!
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@293 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rw-r--r-- | test/types/tc_basic.rb | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/test/types/tc_basic.rb b/test/types/tc_basic.rb index d42e8c5d8..a100f3fa5 100644 --- a/test/types/tc_basic.rb +++ b/test/types/tc_basic.rb @@ -25,25 +25,22 @@ class TestBasic < Test::Unit::TestCase } assert_nothing_raised() { - cfile = File.join($blinkbase,"examples/root/etc/configfile") - unless Blink::Type::File.has_key?(cfile) - Blink::Type::File.new( - :path => cfile - ) - end - @configfile = Blink::Type::File[cfile] + @filepath = "/tmp/testfile" + system("rm -f %s" % @filepath) + @configfile = Blink::Type::File.new( + :path => @filepath, + :create => true, + :checksum => "md5" + ) } assert_nothing_raised() { - unless Blink::Type::Service.has_key?("sleeper") - Blink::Type::Service.new( - :name => "sleeper", - :running => 1 - ) - Blink::Type::Service.setpath( - File.join($blinkbase,"examples/root/etc/init.d") - ) - end - @sleeper = Blink::Type::Service["sleeper"] + @sleeper = Blink::Type::Service.new( + :name => "sleeper", + :running => 1 + ) + Blink::Type::Service.setpath( + File.join($blinkbase,"examples/root/etc/init.d") + ) } assert_nothing_raised() { @component.push( @@ -58,6 +55,7 @@ class TestBasic < Test::Unit::TestCase def teardown Blink::Type.allclear + system("rm -f %s" % @filepath) end def test_name_calls @@ -72,7 +70,7 @@ class TestBasic < Test::Unit::TestCase def test_name_equality #puts "Component is %s, id %s" % [@component, @component.object_id] assert_equal( - File.join($blinkbase,"examples/root/etc/configfile"), + @filepath, @configfile.name ) |