diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-01 16:15:36 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-02-01 16:15:36 +0000 |
| commit | 1d059b0b363aee47cfb776aebcdfc829000e4822 (patch) | |
| tree | 3bdc0edb1b97085008d7ea092c81d439f5d82aba /test | |
| parent | 69a07b1d856efaba9bba8c9cccc8a4f11efcbfdd (diff) | |
| download | puppet-1d059b0b363aee47cfb776aebcdfc829000e4822.tar.gz puppet-1d059b0b363aee47cfb776aebcdfc829000e4822.tar.xz puppet-1d059b0b363aee47cfb776aebcdfc829000e4822.zip | |
Fixing #470, I think. I basically just threw away the validation and let suidmanager do it all when running commands.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2150 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/types/exec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/types/exec.rb b/test/types/exec.rb index 7dc5fca29..918fa62be 100755 --- a/test/types/exec.rb +++ b/test/types/exec.rb @@ -618,6 +618,29 @@ and stuff" assert_apply(exec) end + + # Testing #470 + def test_run_as_created_user + exec = nil + if Process.uid == 0 + user = "nosuchuser" + assert_nothing_raised("Could not create exec with non-existent user") do + exec = Puppet::Type.type(:exec).create( + :command => "/bin/echo yay", + :user => user + ) + end + end + + # Now try the group + group = "nosuchgroup" + assert_nothing_raised("Could not create exec with non-existent user") do + exec = Puppet::Type.type(:exec).create( + :command => "/bin/echo yay", + :group => group + ) + end + end end # $Id$ |
