Skip to content

Commit

Permalink
Add a spec test for older Ubuntu w/sysvinit
Browse files Browse the repository at this point in the history
This is not a guarantee that Ubuntu 10.04 works, or that it uses
sysvinit exclusively, rather that if there is a system that reports a
`debian` service provider, it will be used as a `sysvinit` one.
  • Loading branch information
miketheman committed Aug 20, 2015
1 parent 7c8cdef commit 85ff11e
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
describe 'resource_nginx_service :create on ubuntu 10.04' do
before do
allow(Chef::Platform::ServiceHelpers).to receive(:service_resource_providers).and_return([:debian])
end

cached(:chef_run) do
ChefSpec::SoloRunner.new(
step_into: 'nginx_service',
platform: 'ubuntu',
version: '10.04'
).converge('nginx::example')
end

it_behaves_like 'create a named nginx_service', 'example'

it_behaves_like 'nginx_service :create', 'example'
it_behaves_like 'nginx_service :start', 'example'
it_behaves_like 'nginx_service #sysvinit', 'example'

it_behaves_like 'nginx_config :create', 'example'
end

0 comments on commit 85ff11e

Please sign in to comment.