Signed-off-by: Matt Robinson <[email protected]>
---
 lib/puppet/network/authorization.rb       |    2 +-
 lib/puppet/network/http_server/webrick.rb |    2 +-
 spec/unit/util/settings_spec.rb           |   10 ----------
 test/network/authorization.rb             |    4 ++--
 test/network/server/webrick.rb            |    2 +-
 5 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/lib/puppet/network/authorization.rb 
b/lib/puppet/network/authorization.rb
index 7a61ab9..eb7690d 100644
--- a/lib/puppet/network/authorization.rb
+++ b/lib/puppet/network/authorization.rb
@@ -34,7 +34,7 @@ module Puppet::Network
                         return false
                     end
                 else
-                    if Puppet.mode.master?
+                    if Puppet.run_mode.master?
                         Puppet.debug "Allowing " + msg
                         return true
                     else
diff --git a/lib/puppet/network/http_server/webrick.rb 
b/lib/puppet/network/http_server/webrick.rb
index aa93068..e71d4ba 100644
--- a/lib/puppet/network/http_server/webrick.rb
+++ b/lib/puppet/network/http_server/webrick.rb
@@ -45,7 +45,7 @@ module Puppet
                 # yuck; separate http logs
                 file = nil
                 Puppet.settings.use(:main, :ssl, Puppet[:name])
-                if Puppet.mode.master?
+                if Puppet.run_mode.master?
                     file = Puppet[:masterhttplog]
                 else
                     file = Puppet[:httplog]
diff --git a/spec/unit/util/settings_spec.rb b/spec/unit/util/settings_spec.rb
index 9aeed60..d0d2e0d 100755
--- a/spec/unit/util/settings_spec.rb
+++ b/spec/unit/util/settings_spec.rb
@@ -277,16 +277,6 @@ describe Puppet::Util::Settings do
         it "should have a run_mode that defaults to user" do
             @settings.run_mode.should == :user
         end
-
-        it "should not give a shit if you set a default run_mode yourself" do
-            @settings.setdefaults(:whatever, :run_mode => ["something", 
"yayness"])
-            lambda{ @settings[:run_mode] = :other }.should 
raise_error(ArgumentError, /read-only/)
-        end
-
-        it "CURRENTLY should not allow the user to set a run_mode default" do
-            @settings.setdefaults(:whatever, :run_mode => ["something", 
"yayness"])
-            @settings.run_mode.should == :user
-        end
     end
 
     describe "when choosing which value to return" do
diff --git a/test/network/authorization.rb b/test/network/authorization.rb
index 9200c58..56c5377 100755
--- a/test/network/authorization.rb
+++ b/test/network/authorization.rb
@@ -82,8 +82,8 @@ class TestAuthConfig < Test::Unit::TestCase
         assert(! @obj.authorized?(@request), "Allowed call with no config 
file")
         assert_logged(:notice, /Denying/, "did not log call")
 
-        # Now set our mode to master, so calls are allowed
-        Puppet.mode.stubs(:master?).returns true
+        # Now set our run_mode to master, so calls are allowed
+        Puppet::Util::RunMode.any_instance.stubs(:master?).returns true
         assert(@obj.authorized?(@request),
             "Denied call with no config file and master")
         assert_logged(:debug, /Allowing/, "did not log call")
diff --git a/test/network/server/webrick.rb b/test/network/server/webrick.rb
index 5cde2b7..99b0481 100755
--- a/test/network/server/webrick.rb
+++ b/test/network/server/webrick.rb
@@ -93,7 +93,7 @@ class TestWebrickServer < Test::Unit::TestCase
         }
 
         pid = fork {
-            Puppet.mode.stubs(:master?).returns(true)
+            Puppet::Util::RunMode.any_instance.stubs(:master?).returns true
             assert_nothing_raised() {
                 trap(:INT) { server.shutdown }
                 server.start
-- 
1.7.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to