diff --git a/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb b/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb index c8fd1ed27..1188396b1 100644 --- a/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb +++ b/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb @@ -2,7 +2,6 @@ # author: Stephan Renatus include_recipe 'runit::default' -package 'socat' # put ctl in alt location directory '/opt/chef/embedded/sbin' do @@ -19,9 +18,17 @@ runit_service 'running-runit-service' do run_template_name 'default-svlog' end -runit_service 'non-running-runit-service' do +runit_service 'not-enabled-runit-service' do default_logger true run_template_name 'default-svlog' start_down true + action :enable +end + +runit_service 'not-running-runit-service' do + default_logger true + run_template_name 'default-svlog' action :create end + +execute 'sv down not-running-runit-service' diff --git a/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb b/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb index f9768102f..9303e2f28 100644 --- a/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +++ b/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb @@ -1,3 +1,3 @@ #!/bin/sh -exec 2>&1 -exec socat - TCP4-LISTEN:6701,fork +exec > /dev/null +exec yes diff --git a/test/integration/test/integration/default/service_spec.rb b/test/integration/test/integration/default/service_spec.rb index 297510a29..a617c8121 100644 --- a/test/integration/test/integration/default/service_spec.rb +++ b/test/integration/test/integration/default/service_spec.rb @@ -51,12 +51,18 @@ if os[:family] == 'centos' it { should be_running } end - describe runit_service('non-running-runit-service') do + describe runit_service('not-running-runit-service') do it { should be_enabled } it { should be_installed } it { should_not be_running } end + describe runit_service('not-enabled-runit-service') do + it { should_not be_enabled } + it { should be_installed } + it { should_not be_running } + end + # alt. ctl location describe runit_service('running-runit-service', '/opt/chef/embedded/sbin/sv') do it { should be_enabled }