File tree 5 files changed +11
-9
lines changed
5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 38
38
validate_string($jar_name )
39
39
40
40
# prog is the 'name' of the init.d script.
41
- $prog = $ name
41
+ $prog = " selenium ${ name} "
42
42
43
43
file { "/etc/init.d/${prog}" :
44
44
ensure => ' file' ,
Original file line number Diff line number Diff line change 16
16
include selenium
17
17
18
18
Class[ ' selenium' ] ->
19
- selenium::config { 'seleniumstandalone ' :
19
+ selenium::config { 'server ' :
20
20
display => $display ,
21
21
user => $selenium::user ,
22
22
group => $selenium::group ,
Original file line number Diff line number Diff line change 12
12
13
13
it do
14
14
should include_class ( 'selenium' )
15
- should contain_selenium__config ( 'seleniumstandalone ' ) . with ( {
15
+ should contain_selenium__config ( 'server ' ) . with ( {
16
16
'display' => p [ :display ] ,
17
17
'options' => p [ :options ] ,
18
18
} )
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
2
3
3
describe 'selenium::config' , :type => :define do
4
- let ( :title ) { 'seleniumstandalone ' }
4
+ let ( :title ) { 'server ' }
5
5
6
6
shared_examples 'config' do |params |
7
7
let :pre_condition do
20
20
p . merge! ( params ) if params
21
21
22
22
it do
23
- should contain_file ( "/etc/init.d/#{ title } " ) . with ( {
23
+ should contain_file ( "/etc/init.d/selenium #{ title } " ) . with ( {
24
24
'ensure' => 'file' ,
25
25
'owner' => 'root' ,
26
26
'group' => 'root' ,
27
27
'mode' => '0755' ,
28
28
} ) .
29
- with_content ( /# #{ title } Selenium server init script/ ) .
29
+ with_content ( /# selenium #{ title } Selenium server init script/ ) .
30
30
with_content ( /SLNM_DISPLAY='#{ p [ :display ] } '/ ) .
31
31
with_content ( /SLNM_USER='#{ p [ :user ] } '/ ) .
32
32
with_content ( /SLNM_INSTALL_ROOT='#{ p [ :install_root ] } '/ ) .
33
33
with_content ( /SLNM_JAR_NAME='#{ p [ :jar_name ] } '/ ) .
34
34
with_content ( /SLNM_OPTIONS='#{ p [ :options ] } '/ ) .
35
35
with_content ( /SLNM_JAVA='#{ p [ :java ] } '/ ) .
36
- with_content ( /prog='#{ title } '/ )
36
+ with_content ( /SLNM_LOG_NAME='#{ title } '/ ) .
37
+ with_content ( /prog='selenium#{ title } '/ )
37
38
end
38
39
end
39
40
Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ SLNM_INSTALL_ROOT='<%= @install_root %>'
28
28
SLNM_JAR_NAME=' <%= @jar_name %>'
29
29
SLNM_OPTIONS=' <%= @options %>'
30
30
SLNM_JAVA=' <%= @java %>'
31
+ SLNM_LOG_NAME=' <%= @name %>'
31
32
prog=' <%= @prog %>'
32
33
33
- SLNM_LOG=" ${SLNM_INSTALL_ROOT} /log/${prog } _stdout.log"
34
- SLNM_ERROR_LOG=" ${SLNM_INSTALL_ROOT} /log/${prog) _stderr.log"
34
+ SLNM_LOG=" ${SLNM_INSTALL_ROOT} /log/${SLNM_LOG_NAME } _stdout.log"
35
+ SLNM_ERROR_LOG=" ${SLNM_INSTALL_ROOT} /log/${SLNM_LOG_NAME} _stderr.log"
35
36
SLNM_JAR=" ${SLNM_INSTALL_ROOT} /jars/${SLNM_JAR_NAME} "
36
37
37
38
# config="<path to major config file>"
You can’t perform that action at this time.
0 commit comments