add systemv service unit tests

This commit is contained in:
Christoph Hartmann 2015-09-25 11:47:59 +02:00
parent 11ffdeddad
commit 2901dde219

View file

@ -35,6 +35,16 @@ describe 'Vulcano::Resources::Service' do
_(resource.running?).must_equal true _(resource.running?).must_equal true
end end
# centos 6 with systemv
it 'verify centos 6 package parsing' do
resource = MockLoader.new(:centos6).load_resource('service', 'sshd')
srv = { name: 'sshd', description: nil, installed: true, running: true, enabled: true, type: 'sysv' }
_(resource.info).must_equal srv
_(resource.installed?).must_equal true
_(resource.enabled?).must_equal true
_(resource.running?).must_equal true
end
# centos 7 with systemd # centos 7 with systemd
it 'verify centos package parsing' do it 'verify centos package parsing' do
resource = MockLoader.new(:centos7).load_resource('service', 'sshd') resource = MockLoader.new(:centos7).load_resource('service', 'sshd')
@ -65,6 +75,16 @@ describe 'Vulcano::Resources::Service' do
_(resource.running?).must_equal true _(resource.running?).must_equal true
end end
# debian 7 with systemv
it 'verify debian 7 package parsing' do
resource = MockLoader.new(:debian7).load_resource('service', 'sshd')
srv = { name: 'sshd', description: nil, installed: true, running: true, enabled: true, type: 'sysv' }
_(resource.info).must_equal srv
_(resource.installed?).must_equal true
_(resource.enabled?).must_equal true
_(resource.running?).must_equal true
end
# debian 8 with systemd # debian 8 with systemd
it 'verify arch linux package parsing' do it 'verify arch linux package parsing' do
resource = MockLoader.new(:debian7).load_resource('service', 'sshd') resource = MockLoader.new(:debian7).load_resource('service', 'sshd')