summaryrefslogtreecommitdiffstats
path: root/test/ral
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-24 16:37:56 -0500
committerLuke Kanies <luke@madstop.com>2008-03-24 16:37:56 -0500
commit528bbf1caefdd6963353df9242b81409f4dacbe5 (patch)
tree3791df515950127a0b0b92ba41434522fe351c8a /test/ral
parent017f6730aa4b8afcc0f8da80c79eb6981a1ad6b9 (diff)
Fixing a couple of tests.
Diffstat (limited to 'test/ral')
-rwxr-xr-xtest/ral/type/tidy.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/ral/type/tidy.rb b/test/ral/type/tidy.rb
index 17f98df22..657ca6e93 100755
--- a/test/ral/type/tidy.rb
+++ b/test/ral/type/tidy.rb
@@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../../lib/puppettest'
require 'puppettest'
require 'puppettest/support/utils'
-require 'puppet/type/tidy'
class TestTidy < Test::Unit::TestCase
include PuppetTest::Support::Utils
@@ -76,7 +75,7 @@ class TestTidy < Test::Unit::TestCase
# Test the different age iterations.
def test_age_conversions
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
convertors = {
:second => 1,
@@ -119,7 +118,7 @@ class TestTidy < Test::Unit::TestCase
:gb => 3
}
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
# First make sure we default to kb
assert_nothing_raised do
@@ -149,7 +148,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_agetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :age => "1m"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
age = tidy.property(:age)
@@ -161,7 +160,7 @@ class TestTidy < Test::Unit::TestCase
end
def test_sizetest
- tidy = Puppet::Type.newtidy :path => tempfile(), :size => "1k"
+ tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :size => "1k"
size = tidy.property(:size)
@@ -175,7 +174,7 @@ class TestTidy < Test::Unit::TestCase
# Make sure we can remove different types of files
def test_tidytypes
path = tempfile()
- tidy = Puppet::Type.newtidy :path => path, :size => "1b", :age => "1s"
+ tidy = Puppet::Type.type(:tidy).create :path => path, :size => "1b", :age => "1s"
# Start with a file
File.open(path, "w") { |f| f.puts "this is a test" }
@@ -232,7 +231,7 @@ class TestTidy < Test::Unit::TestCase
Dir.mkdir(dir)
File.symlink(target, link)
- tidy = Puppet::Type.newtidy :path => dir, :size => "1b", :recurse => true
+ tidy = Puppet::Type.type(:tidy).create :path => dir, :size => "1b", :recurse => true
assert_apply(tidy)
assert(! FileTest.symlink?(link), "link was not tidied")
end