Skip to content

Commit 558c335

Browse files
author
Joshua Hoblitt
committed
rename selenium::server init.d from seleniumstandalone -> seleniumserver
1 parent 8523e66 commit 558c335

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

manifests/config.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
validate_string($jar_name)
3939

4040
# prog is the 'name' of the init.d script.
41-
$prog = $name
41+
$prog = "selenium${name}"
4242

4343
file { "/etc/init.d/${prog}":
4444
ensure => 'file',

manifests/server.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
include selenium
1717

1818
Class[ 'selenium' ] ->
19-
selenium::config{ 'seleniumstandalone':
19+
selenium::config{ 'server':
2020
display => $display,
2121
user => $selenium::user,
2222
group => $selenium::group,

spec/classes/selenium_server_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
it do
1414
should include_class('selenium')
15-
should contain_selenium__config('seleniumstandalone').with({
15+
should contain_selenium__config('server').with({
1616
'display' => p[:display],
1717
'options' => p[:options],
1818
})

spec/defines/selenium_config_spec.rb

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'spec_helper'
22

33
describe 'selenium::config', :type => :define do
4-
let(:title) { 'seleniumstandalone' }
4+
let(:title) { 'server' }
55

66
shared_examples 'config' do |params|
77
let :pre_condition do
@@ -20,20 +20,21 @@
2020
p.merge!(params) if params
2121

2222
it do
23-
should contain_file("/etc/init.d/#{title}").with({
23+
should contain_file("/etc/init.d/selenium#{title}").with({
2424
'ensure' => 'file',
2525
'owner' => 'root',
2626
'group' => 'root',
2727
'mode' => '0755',
2828
}).
29-
with_content(/# #{title} Selenium server init script/).
29+
with_content(/# selenium#{title} Selenium server init script/).
3030
with_content(/SLNM_DISPLAY='#{p[:display]}'/).
3131
with_content(/SLNM_USER='#{p[:user]}'/).
3232
with_content(/SLNM_INSTALL_ROOT='#{p[:install_root]}'/).
3333
with_content(/SLNM_JAR_NAME='#{p[:jar_name]}'/).
3434
with_content(/SLNM_OPTIONS='#{p[:options]}'/).
3535
with_content(/SLNM_JAVA='#{p[:java]}'/).
36-
with_content(/prog='#{title}'/)
36+
with_content(/SLNM_LOG_NAME='#{title}'/).
37+
with_content(/prog='selenium#{title}'/)
3738
end
3839
end
3940

templates/init.d/selenium.erb

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ SLNM_INSTALL_ROOT='<%= @install_root %>'
2828
SLNM_JAR_NAME='<%= @jar_name %>'
2929
SLNM_OPTIONS='<%= @options %>'
3030
SLNM_JAVA='<%= @java %>'
31+
SLNM_LOG_NAME='<%= @name %>'
3132
prog='<%= @prog %>'
3233

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"
3536
SLNM_JAR="${SLNM_INSTALL_ROOT}/jars/${SLNM_JAR_NAME}"
3637

3738
#config="<path to major config file>"

0 commit comments

Comments
 (0)