diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 02:12:43 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 02:12:43 +0000 |
| commit | 18320ee5144c76de4d1d2c5c0fa27fd719882991 (patch) | |
| tree | b77910e73ff254b00e0c96d0bcbb3df746819c95 /test | |
| parent | 7fd5b6f91c207efe26a4d296a03be82ec2cdb03d (diff) | |
| download | puppet-18320ee5144c76de4d1d2c5c0fa27fd719882991.tar.gz puppet-18320ee5144c76de4d1d2c5c0fa27fd719882991.tar.xz puppet-18320ee5144c76de4d1d2c5c0fa27fd719882991.zip | |
Adding a "force" parameter in files to fix #242. Currently only used when replacing directories with links, but should probably be used in other places.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1538 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/types/file.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/types/file.rb b/test/types/file.rb index 551d96d89..1d962ee30 100644 --- a/test/types/file.rb +++ b/test/types/file.rb @@ -1194,10 +1194,18 @@ class TestFile < Test::Unit::TestCase assert_nothing_raised { file = Puppet.type(:file).create( :ensure => path, - :path => link + :path => link, + :backup => false ) } + # First run through without :force + assert_events([], file) + + assert(FileTest.directory?(link), "Link replaced dir without force") + + assert_nothing_raised { file[:force] = true } + assert_events([:link_created], file) assert(FileTest.symlink?(link), "Link was not created") |
