diff options
| author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-22 01:28:01 +0000 |
|---|---|---|
| committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-22 01:28:01 +0000 |
| commit | be711d357857f5e6d4a28a22bd60dd89e9e136c0 (patch) | |
| tree | ce7d65c9491bb7da343b7ce7790584d0202f300f /test/util | |
| parent | c616572d59b8b5142f64193ab87073fbc3b788f7 (diff) | |
| download | puppet-be711d357857f5e6d4a28a22bd60dd89e9e136c0.tar.gz puppet-be711d357857f5e6d4a28a22bd60dd89e9e136c0.tar.xz puppet-be711d357857f5e6d4a28a22bd60dd89e9e136c0.zip | |
Allow execution of bare strings as long as there's no attempt to change uid/gid
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1963 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/util')
| -rwxr-xr-x | test/util/utiltest.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/util/utiltest.rb b/test/util/utiltest.rb index 3f2532fc2..3e9082bf5 100755 --- a/test/util/utiltest.rb +++ b/test/util/utiltest.rb @@ -308,6 +308,18 @@ class TestPuppetUtil < Test::Unit::TestCase end end + def test_string_exec + cmd = "/bin/echo howdy" + output = nil + assert_nothing_raised { + output = Puppet::Util.execute(cmd) + } + assert_equal("howdy\n", output) + assert_raise(RuntimeError) { + Puppet::Util.execute(cmd, 0, 0) + } + end + # This is mostly to test #380. def test_get_provider_value group = Puppet::Type.type(:group).create :name => "yayness", :ensure => :present |
