summaryrefslogtreecommitdiff
path: root/spec/unit/provider/service/upstart_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/service/upstart_spec.rb')
-rwxr-xr-xspec/unit/provider/service/upstart_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/unit/provider/service/upstart_spec.rb b/spec/unit/provider/service/upstart_spec.rb
index 06be70acb..d31511626 100755
--- a/spec/unit/provider/service/upstart_spec.rb
+++ b/spec/unit/provider/service/upstart_spec.rb
@@ -22,6 +22,11 @@ describe Puppet::Type.type(:service).provider(:upstart) do
provider_class.stubs(:which).with("/sbin/initctl").returns("/sbin/initctl")
end
+ it "should be the default provider on Ubuntu" do
+ Facter.expects(:value).with(:operatingsystem).returns("Ubuntu")
+ described_class.default?.should be_true
+ end
+
describe "excluding services" do
it "ignores tty and serial on Redhat systems" do
Facter.stubs(:value).with(:osfamily).returns('RedHat')
@@ -50,7 +55,13 @@ describe Puppet::Type.type(:service).provider(:upstart) do
end
it "should not find excluded services" do
- processes = "wait-for-state stop/waiting\nportmap-wait start/running\nidmapd-mounting stop/waiting\nstartpar-bridge start/running"
+ processes = "wait-for-state stop/waiting"
+ processes += "\nportmap-wait start/running"
+ processes += "\nidmapd-mounting stop/waiting"
+ processes += "\nstartpar-bridge start/running"
+ processes += "\ncryptdisks-udev stop/waiting"
+ processes += "\nstatd-mounting stop/waiting"
+ processes += "\ngssd-mounting stop/waiting"
provider_class.stubs(:execpipe).yields(processes)
provider_class.instances.should be_empty
end