-
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.
Merge pull request #4 from jhoblitt/system_tests
System tests
- Loading branch information
Showing
6 changed files
with
135 additions
and
29 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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
require 'spec_helper_system' | ||
|
||
describe 'selenium::hub class' do | ||
describe 'running puppet code' do | ||
# Using puppet_apply as a helper | ||
it 'should work with no errors' do | ||
pp = <<-EOS | ||
include java | ||
Class['java'] -> Class['selenium::hub'] | ||
class { 'selenium::hub': } | ||
EOS | ||
|
||
# Run it twice and test for idempotency | ||
puppet_apply(pp) do |r| | ||
r.exit_code.should_not == 1 | ||
r.refresh | ||
r.exit_code.should be_zero | ||
end | ||
end | ||
end | ||
|
||
describe file('/etc/init.d/seleniumhub') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
it { should be_mode 755 } | ||
end | ||
|
||
%w[hub_stdout.log hub_stderr.log].each do |file| | ||
describe file("/opt/selenium/log/#{file}") do | ||
it { should be_file } | ||
it { should be_owned_by 'selenium' } | ||
it { should be_grouped_into 'selenium' } | ||
it { should be_mode 644} | ||
end | ||
end | ||
|
||
describe service('seleniumhub') do | ||
it { should be_running } | ||
it { should be_enabled } | ||
end | ||
|
||
describe port(4444) do | ||
it { should be_listening.with('tcp') } | ||
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,47 @@ | ||
require 'spec_helper_system' | ||
|
||
describe 'selenium::node class' do | ||
describe 'running puppet code' do | ||
# Using puppet_apply as a helper | ||
it 'should work with no errors' do | ||
pp = <<-EOS | ||
include java | ||
Class['java'] -> Class['selenium::node'] | ||
class { 'selenium::node': } | ||
EOS | ||
|
||
# Run it twice and test for idempotency | ||
puppet_apply(pp) do |r| | ||
r.exit_code.should_not == 1 | ||
r.refresh | ||
r.exit_code.should be_zero | ||
end | ||
end | ||
end | ||
|
||
describe file('/etc/init.d/seleniumnode') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
it { should be_mode 755 } | ||
end | ||
|
||
%w[node_stdout.log node_stderr.log].each do |file| | ||
describe file("/opt/selenium/log/#{file}") do | ||
it { should be_file } | ||
it { should be_owned_by 'selenium' } | ||
it { should be_grouped_into 'selenium' } | ||
it { should be_mode 644} | ||
end | ||
end | ||
|
||
describe service('seleniumnode') do | ||
it { should be_running } | ||
it { should be_enabled } | ||
end | ||
|
||
describe port(5555) do | ||
it { should be_listening.with('tcp') } | ||
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