summaryrefslogtreecommitdiffstats
path: root/test/other
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-05 23:04:33 -0600
committerLuke Kanies <luke@madstop.com>2008-11-05 23:04:33 -0600
commit0149e2e125fc09bb5a8c1ff206cd46e06c0593cd (patch)
treea97f8bd6e045ec2aaf9a25682f341425b5d3b481 /test/other
parent35c623e65b44fed098374288e8c1dfc450a1f9f7 (diff)
downloadpuppet-0149e2e125fc09bb5a8c1ff206cd46e06c0593cd.tar.gz
puppet-0149e2e125fc09bb5a8c1ff206cd46e06c0593cd.tar.xz
puppet-0149e2e125fc09bb5a8c1ff206cd46e06c0593cd.zip
Converting the file 'source' property to a parameter.
This makes a lot of sense because source was always more of a metaparameter than a property -- it affected the 'should' values of other properties, but it shouldn't have done any other work. It will hopefully make everything else much cleaner. This is such a large commit mostly because of the need to fix a lot of tests. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test/other')
-rwxr-xr-xtest/other/overrides.rb34
1 files changed, 14 insertions, 20 deletions
diff --git a/test/other/overrides.rb b/test/other/overrides.rb
index e0e3fdf5f..b38cb09e8 100755
--- a/test/other/overrides.rb
+++ b/test/other/overrides.rb
@@ -23,33 +23,27 @@ class TestOverrides < Test::Unit::TestCase
basedir = File.join(tmpdir(), "overridetesting")
mksubdirs(basedir, 1)
- baseobj = nil
basefile = File.join(basedir, "file")
- assert_nothing_raised("Could not create base obj") {
- baseobj = Puppet.type(:file).create(
- :title => "base",
- :path => basedir,
- :recurse => true,
- :mode => "755"
- )
- }
+ baseobj = Puppet.type(:file).create(
+ :title => "base",
+ :path => basedir,
+ :recurse => true,
+ :mode => "755"
+ )
- subobj = nil
subdir = File.join(basedir, "0")
subfile = File.join(subdir, "file")
- assert_nothing_raised("Could not create sub obj") {
- subobj = Puppet.type(:file).create(
- :title => "sub",
- :path => subdir,
- :recurse => true,
- :mode => "644"
- )
- }
+ subobj = Puppet.type(:file).create(
+ :title => "sub",
+ :path => subdir,
+ :recurse => true,
+ :mode => "644"
+ )
assert_apply(baseobj, subobj)
- assert(File.stat(basefile).mode & 007777 == 0755)
- assert(File.stat(subfile).mode & 007777 == 0644)
+ assert_equal(0755, File.stat(basefile).mode & 007777, "Did not set base mode")
+ assert_equal(0644, File.stat(subfile).mode & 007777, "Did not set overridden mode")
end
def test_deepoverride