Skip to content

Commit

Permalink
add class selenium::install
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Oct 1, 2013
1 parent f4f887b commit 5071e9c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
12 changes: 12 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,23 @@
}

$jar_path = "${selenium::server::install_path}/jars"
$log_path = "${selenium::server::install_path}/log"

file { $jar_path:
ensure => directory,
}

file { $log_path:
ensure => directory,
}

file { '/var/log/selenium':
ensure => link,
owner => 'root',
group => 'root',
target => $log_path,
}

wget::fetch { 'selenium-server-standalone':
source => $jar_url,
destination => "${selenium::server::jar_path}/${jar_name}",
Expand Down
21 changes: 20 additions & 1 deletion spec/classes/selenium_install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@
it do
should include_class('wget')
should contain_class('selenium::install').with_version('2.35.0')
should contain_file('/opt/selenium').with_ensure('directory')
should contain_file('/opt/selenium').with({
'ensure' => 'directory',
'owner' => 'selenium',
'group' => 'selenium',
})
should contain_file('/opt/selenium/jars').with({
'ensure' => 'directory',
'owner' => 'selenium',
'group' => 'selenium',
})
should contain_file('/opt/selenium/log').with({
'ensure' => 'directory',
'owner' => 'selenium',
'group' => 'selenium',
})
should contain_file('/var/log/selenium').with({
'ensure' => 'link',
'owner' => 'root',
'group' => 'root',
})
should contain_wget__fetch('selenium-server-standalone')
end

Expand Down

0 comments on commit 5071e9c

Please sign in to comment.