-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stub out selenium::{server,params} classes
- Loading branch information
Joshua Hoblitt
committed
Oct 1, 2013
1 parent
edc5da0
commit eb724de
Showing
11 changed files
with
94 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
name 'jhoblitt-module_skel' | ||
name 'jhoblitt-selenium' | ||
version '0.0.1' | ||
|
||
author 'Joshua Hoblitt <[email protected]>' | ||
license 'Apache' | ||
project_page 'https://github.com/jhoblitt/puppet-module_skel' | ||
source 'https://github.com/jhoblitt/puppet-module_skel.git' | ||
project_page 'https://github.com/jhoblitt/puppet-selenium' | ||
source 'https://github.com/jhoblitt/puppet-selenium.git' | ||
summary 'module skeleton' | ||
description 'module skeleton' | ||
dependency 'puppetlabs/stdlib', '>= 3.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# == Class: selenium::params | ||
# | ||
# This class should be considered private. | ||
# | ||
# | ||
class selenium::params { | ||
$user = 'selenium' | ||
$group = $user | ||
|
||
case $::osfamily { | ||
'redhat': {} | ||
default: { | ||
fail("Module ${module_name} is not supported on ${::operatingsystem}") | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# == Class: selenium::server | ||
# | ||
# simple template | ||
# | ||
# === Examples | ||
# | ||
# include selenium::server | ||
# | ||
class selenium::server( | ||
$user = $selenium::params::user, | ||
$group = $selenium::params::group, | ||
) inherits selenium::params { | ||
validate_string($user) | ||
validate_string($group) | ||
|
||
user { $user: | ||
managehome => true, | ||
gid => [$group], | ||
} | ||
group { $group: } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'spec_helper' | ||
|
||
describe 'selenium::params', :type => :class do | ||
describe 'for osfamily RedHat' do | ||
let :facts do | ||
{ | ||
:osfamily => 'RedHat', | ||
} | ||
end | ||
|
||
it { should include_class('selenium::params') } | ||
end | ||
|
||
describe 'unsupported osfamily' do | ||
let :facts do | ||
{ | ||
:osfamily => 'Debian', | ||
:operatingsystem => 'Debian', | ||
} | ||
end | ||
|
||
it 'should fail' do | ||
expect { should include_class('selenium::params') }. | ||
to raise_error(Puppet::Error, /not supported on Debian/) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe 'selenium::server', :type => :class do | ||
|
||
describe 'for osfamily RedHat' do | ||
let :facts do | ||
{ | ||
:osfamily => 'RedHat', | ||
} | ||
end | ||
|
||
it { should contain_class('selenium::server') } | ||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters