diff options
| author | Jacob Helwig <jacob@puppetlabs.com> | 2011-07-08 13:39:02 -0700 |
|---|---|---|
| committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-07-08 13:39:02 -0700 |
| commit | 474b6b530aa5a80414740c1733d93e6187199257 (patch) | |
| tree | 59681a2cd5029d923b94d7fa24d407ec549ed205 | |
| parent | 3cc09811cae1b263c0f94c78619b9e195c3d6bf9 (diff) | |
| parent | 3a70503b60f9fd51177df4e9267c5ac28b06fb2d (diff) | |
| download | puppet-474b6b530aa5a80414740c1733d93e6187199257.tar.gz puppet-474b6b530aa5a80414740c1733d93e6187199257.tar.xz puppet-474b6b530aa5a80414740c1733d93e6187199257.zip | |
Merge branch 'disable-master-on-windows'
* disable-master-on-windows:
Disable the master on Windows instead of blowing up with failed resources
| -rw-r--r-- | lib/puppet/application/master.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/application/master_spec.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb index 18425c8bc..b4da770f0 100644 --- a/lib/puppet/application/master.rb +++ b/lib/puppet/application/master.rb @@ -206,6 +206,8 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License end def setup + raise Puppet::Error.new("Puppet master is not supported on Microsoft Windows") if Puppet.features.microsoft_windows? + # Handle the logging settings. if options[:debug] or options[:verbose] if options[:debug] diff --git a/spec/unit/application/master_spec.rb b/spec/unit/application/master_spec.rb index 2f6a328e2..e36df8caa 100755 --- a/spec/unit/application/master_spec.rb +++ b/spec/unit/application/master_spec.rb @@ -106,7 +106,6 @@ describe Puppet::Application::Master do end describe "during setup" do - before :each do Puppet::Log.stubs(:newdestination) Puppet.stubs(:settraps) @@ -117,6 +116,12 @@ describe Puppet::Application::Master do @master.options.stubs(:[]).with(any_parameters) end + it "should abort stating that the master is not supported on Windows" do + Puppet.features.stubs(:microsoft_windows?).returns(true) + + expect { @master.setup }.to raise_error(Puppet::Error, /Puppet master is not supported on Microsoft Windows/) + end + it "should set log level to debug if --debug was passed" do @master.options.stubs(:[]).with(:debug).returns(true) @master.setup |
