diff options
| author | christian <christian@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-08-09 08:45:50 +0000 |
|---|---|---|
| committer | christian <christian@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-08-09 08:45:50 +0000 |
| commit | 3de4829cf0b607624b8a5f5f1e6055141d85af2f (patch) | |
| tree | 16cb9ef447771dace252003abba400a40d8b520d /test/network/handler | |
| parent | 5a25701723431e0ebe2d7134ab65d56bee2c5244 (diff) | |
| download | puppet-3de4829cf0b607624b8a5f5f1e6055141d85af2f.tar.gz puppet-3de4829cf0b607624b8a5f5f1e6055141d85af2f.tar.xz puppet-3de4829cf0b607624b8a5f5f1e6055141d85af2f.zip | |
Refactor SUIDManager tests to run without root, change SUIDManager's behavior to not silently fail when it's not root and fix all other tests that broke as a result.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2759 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/network/handler')
| -rwxr-xr-x | test/network/handler/bucket.rb | 3 | ||||
| -rwxr-xr-x | test/network/handler/ca.rb | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/network/handler/bucket.rb b/test/network/handler/bucket.rb index eb488dd33..65badc9eb 100755 --- a/test/network/handler/bucket.rb +++ b/test/network/handler/bucket.rb @@ -5,6 +5,7 @@ $:.unshift("../../lib") if __FILE__ =~ /\.rb$/ require 'puppettest' require 'puppet/network/handler/filebucket' require 'base64' +require 'mocha' class TestBucket < Test::Unit::TestCase include PuppetTest::ServerTest @@ -204,6 +205,8 @@ class TestBucket < Test::Unit::TestCase # test that things work over the wire def test_webxmlmix + Puppet::Util::SUIDManager.stubs(:asuser).yields + files = filelist() tmpdir = File.join(tmpdir(),"tmpfiledir") diff --git a/test/network/handler/ca.rb b/test/network/handler/ca.rb index 3c89f597b..f503d7c7a 100755 --- a/test/network/handler/ca.rb +++ b/test/network/handler/ca.rb @@ -4,6 +4,7 @@ $:.unshift("../../lib") if __FILE__ =~ /\.rb$/ require 'puppettest' require 'puppet/network/handler/ca' +require 'mocha' if ARGV.length > 0 and ARGV[0] == "short" $short = true @@ -13,6 +14,12 @@ end class TestCA < Test::Unit::TestCase include PuppetTest::ServerTest + + def setup + Puppet::Util::SUIDManager.stubs(:asuser).yields + super + end + # Verify that we're autosigning. We have to autosign a "different" machine, # since we always autosign the CA server's certificate. def test_autocertgeneration |
