summaryrefslogtreecommitdiffstats
path: root/test/ral/type/tidy.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-03-25 18:18:34 -0500
committerLuke Kanies <luke@madstop.com>2008-03-25 18:18:34 -0500
commita8592f1009040ebf30a98268610915cc33bb3f63 (patch)
tree49f61323a8536d58ce332e97b882677f55727df7 /test/ral/type/tidy.rb
parente1907798425a7b163ac1b831b0cf11e88985815e (diff)
parent491a69682728818e04b8a20a5d8f4f783ad6ddaf (diff)
downloadpuppet-a8592f1009040ebf30a98268610915cc33bb3f63.tar.gz
puppet-a8592f1009040ebf30a98268610915cc33bb3f63.tar.xz
puppet-a8592f1009040ebf30a98268610915cc33bb3f63.zip
Merge branch '0.24.x'
Conflicts: install.rb lib/puppet/defaults.rb man/man8/puppet.8
Diffstat (limited to 'test/ral/type/tidy.rb')
-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