summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorJacob Helwig <jacob@puppetlabs.com>2011-07-08 11:25:03 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-07-08 13:36:47 -0700
commit3a70503b60f9fd51177df4e9267c5ac28b06fb2d (patch)
tree59681a2cd5029d923b94d7fa24d407ec549ed205 /spec/unit/application
parent3cc09811cae1b263c0f94c78619b9e195c3d6bf9 (diff)
downloadpuppet-3a70503b60f9fd51177df4e9267c5ac28b06fb2d.tar.gz
puppet-3a70503b60f9fd51177df4e9267c5ac28b06fb2d.tar.xz
puppet-3a70503b60f9fd51177df4e9267c5ac28b06fb2d.zip
Disable the master on Windows instead of blowing up with failed resources
Running the Puppet master on Windows is not supported, so instead of failing with what can be cryptic error messages about failed resources we fail with an explicit error message about the master on Windows not being supported. This way a user isn't mistakenly given the impression that running a master on Windows will work, and they just have something mis-configured. Signed-off-by: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/master_spec.rb7
1 files changed, 6 insertions, 1 deletions
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