diff options
Diffstat (limited to 'test/other/overrides.rb')
| -rwxr-xr-x | test/other/overrides.rb | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/test/other/overrides.rb b/test/other/overrides.rb index 800eab1b7..272f78e30 100755 --- a/test/other/overrides.rb +++ b/test/other/overrides.rb @@ -25,27 +25,28 @@ class TestOverrides < Test::Unit::TestCase baseobj = nil basefile = File.join(basedir, "file") - config = mk_configuration - - baseobj = config.create_resource(:file, - :title => "base", - :path => basedir, - :recurse => true, - :mode => "755" - ) + assert_nothing_raised("Could not create base obj") { + 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 = config.create_resource(:file, - :title => "sub", - :path => subdir, - :recurse => true, - :mode => "644" - ) - - config.apply + assert_apply(baseobj, subobj) assert(File.stat(basefile).mode & 007777 == 0755) assert(File.stat(subfile).mode & 007777 == 0644) |
