poise-monit 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/poise_monit/service_providers/monit.rb +5 -0
- data/lib/poise_monit/version.rb +1 -1
- data/test/spec/service_providers/monit_spec.rb +19 -0
- data/test/spec/spec_helper.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9eed9d6be8fea50a14e11d1d7d6121df701f523
|
4
|
+
data.tar.gz: c772a05c0c3e5847273aef9dee0a3badda59c8ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4b482f94cffcb183b05928211f331b39d939855692c6e58dbe9981ff37aa289f69d97416189e53564e14cc826dd589e14fde90208afef68e3480cb3b57cb808
|
7
|
+
data.tar.gz: 1fa4a28e969c98219be54689fc7b3b5d3f79d03b55d723d4c41c62e0b2dfb363b29120d9640c3cb3bf2b2977c082d0df109c52f2d9e4551e565e1956ca8ecac0
|
data/CHANGELOG.md
CHANGED
@@ -28,6 +28,11 @@ module PoiseMonit
|
|
28
28
|
class Monit < PoiseService::ServiceProviders::Sysvinit
|
29
29
|
provides(:monit)
|
30
30
|
|
31
|
+
# Override the provides_auto? from Sysvinit. Always supported.
|
32
|
+
def self.provides_auto?(_node, _resource)
|
33
|
+
true
|
34
|
+
end
|
35
|
+
|
31
36
|
# Override the default reload action because monit_service doesn't
|
32
37
|
# support reload itself.
|
33
38
|
def action_reload
|
data/lib/poise_monit/version.rb
CHANGED
@@ -55,4 +55,23 @@ describe PoiseMonit::ServiceProviders::Monit do
|
|
55
55
|
|
56
56
|
it { is_expected.to create_monit_config('myapp').with(path: '/etc/monit-one/conf.d/myapp.conf') }
|
57
57
|
end # /context with an explicit monit via options
|
58
|
+
|
59
|
+
context 'with default provider' do
|
60
|
+
recipe do
|
61
|
+
poise_service 'myapp' do
|
62
|
+
action :nothing
|
63
|
+
end
|
64
|
+
end
|
65
|
+
subject { chef_run.poise_service('myapp').provider_for_action(:enable) }
|
66
|
+
before do
|
67
|
+
begin
|
68
|
+
PoiseService::ServiceProviders::Base.remove_class_variable(:@@service_resource_hints)
|
69
|
+
rescue NameError
|
70
|
+
# This space left intentionally blank.
|
71
|
+
end
|
72
|
+
allow(Chef::Platform::ServiceHelpers).to receive(:service_resource_providers).and_return([:systemd, :upstart, :debian])
|
73
|
+
end
|
74
|
+
|
75
|
+
it { is_expected.to_not be_a described_class }
|
76
|
+
end # /context with default provider
|
58
77
|
end
|
data/test/spec/spec_helper.rb
CHANGED