From c96870bb589150644a79b60aa409c73d7881c31e Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Wed, 2 Oct 2013 15:32:00 -0700 Subject: [PATCH] mv service resource into selenium::config to prevent circular deps --- manifests/config.pp | 6 ++++++ manifests/server.pp | 6 ------ spec/classes/selenium_server_spec.rb | 6 ------ spec/defines/selenium_config_spec.rb | 6 ++++++ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 1793767..1b866df 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -46,6 +46,12 @@ group => 'root', mode => '0755', content => template("${module_name}/init.d/selenium.erb"), + } -> + service { $prog: + ensure => running, + hasstatus => true, + hasrestart => true, + enable => true, } } diff --git a/manifests/server.pp b/manifests/server.pp index 77f742d..f2c0c13 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -31,12 +31,6 @@ options => $options, java => $selenium::java, } -> - service { 'seleniumserver': - ensure => running, - hasstatus => true, - hasrestart => true, - enable => true, - } -> Class[ 'selenium::server' ] } diff --git a/spec/classes/selenium_server_spec.rb b/spec/classes/selenium_server_spec.rb index 1b43e2f..87335af 100644 --- a/spec/classes/selenium_server_spec.rb +++ b/spec/classes/selenium_server_spec.rb @@ -16,12 +16,6 @@ 'display' => p[:display], 'options' => p[:options], }) - should contain_service('seleniumserver').with({ - :ensure => 'running', - :hasstatus => 'true', - :hasrestart => 'true', - :enable => 'true', - }) should contain_class('selenium::server') end end diff --git a/spec/defines/selenium_config_spec.rb b/spec/defines/selenium_config_spec.rb index 4216a94..658c518 100644 --- a/spec/defines/selenium_config_spec.rb +++ b/spec/defines/selenium_config_spec.rb @@ -35,6 +35,12 @@ with_content(/SLNM_JAVA='#{p[:java]}'/). with_content(/SLNM_LOG_NAME='#{title}'/). with_content(/prog='selenium#{title}'/) + should contain_service("selenium#{title}").with({ + :ensure => 'running', + :hasstatus => 'true', + :hasrestart => 'true', + :enable => 'true', + }) end end