-
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 #14 from jhoblitt/feature/beaker
convert from rspec-systerm -> beaker
- Loading branch information
Showing
28 changed files
with
267 additions
and
73 deletions.
There are no files selected for viewing
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
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,10 @@ | ||
HOSTS: | ||
centos-59-x64: | ||
roles: | ||
- master | ||
platform: el-5-x86_64 | ||
box : centos-59-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: git |
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,12 @@ | ||
HOSTS: | ||
centos-64-x64: | ||
roles: | ||
- master | ||
- database | ||
- dashboard | ||
platform: el-6-x86_64 | ||
box : centos-64-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: pe |
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,10 @@ | ||
HOSTS: | ||
centos-64-x64: | ||
roles: | ||
- master | ||
platform: el-6-x86_64 | ||
box : centos-64-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
debian-607-x64: | ||
roles: | ||
- master | ||
platform: debian-6-amd64 | ||
box : debian-607-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: git |
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,10 @@ | ||
HOSTS: | ||
debian-70rc1-x64: | ||
roles: | ||
- master | ||
platform: debian-7-amd64 | ||
box : debian-70rc1-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: git |
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,11 @@ | ||
HOSTS: | ||
debian-73-x64.localhost: | ||
roles: | ||
- master | ||
platform: debian-7-amd64 | ||
box : debian-73-x64-virtualbox-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
log_level: debug | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
centos-65-x64.localdomain: | ||
roles: | ||
- master | ||
platform: el-6-x86_64 | ||
box : centos-65-x64-virtualbox-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
fedora-18-x64: | ||
roles: | ||
- master | ||
platform: fedora-18-x86_64 | ||
box : fedora-18-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
sles-11-x64.local: | ||
roles: | ||
- master | ||
platform: sles-11-x64 | ||
box : sles-11sp1-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
sles-11sp1-x64: | ||
roles: | ||
- master | ||
platform: sles-11-x86_64 | ||
box : sles-11sp1-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: git |
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,10 @@ | ||
HOSTS: | ||
ubuntu-server-10044-x64: | ||
roles: | ||
- master | ||
platform: ubuntu-10.04-amd64 | ||
box : ubuntu-server-10044-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,10 @@ | ||
HOSTS: | ||
ubuntu-server-12042-x64: | ||
roles: | ||
- master | ||
platform: ubuntu-12.04-amd64 | ||
box : ubuntu-server-12042-x64-vbox4210-nocm | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box | ||
hypervisor : vagrant | ||
CONFIG: | ||
type: foss |
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,11 @@ | ||
HOSTS: | ||
ubuntu-server-1404-x64: | ||
roles: | ||
- master | ||
platform: ubuntu-14.04-amd64 | ||
box : puppetlabs/ubuntu-14.04-64-nocm | ||
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm | ||
hypervisor : vagrant | ||
CONFIG: | ||
log_level : debug | ||
type: git |
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,55 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'selenium::server class' do | ||
after(:all) do | ||
shell "service seleniumserver stop" | ||
end | ||
|
||
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::server'] | ||
class { 'selenium::server': } | ||
EOS | ||
|
||
# Run it twice and test for idempotency | ||
expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") | ||
expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") | ||
end | ||
end | ||
|
||
describe file('/etc/init.d/seleniumserver') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
it { should be_mode 755 } | ||
end | ||
|
||
%w[server_stdout.log server_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('seleniumserver') do | ||
it { should be_running } | ||
it { should be_enabled } | ||
end | ||
|
||
describe process('java') do | ||
its(:args) { should match /-Dwebdriver.enable.native.events=1/ } | ||
it { should be_running } | ||
end | ||
|
||
pending('daemon is very slow to start listening') do | ||
describe port(4444) do | ||
it { should be_listening.with('tcp') } | ||
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
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,33 @@ | ||
require 'beaker-rspec/spec_helper' | ||
require 'beaker-rspec/helpers/serverspec' | ||
|
||
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' | ||
if hosts.first.is_pe? | ||
install_pe | ||
else | ||
install_puppet | ||
end | ||
hosts.each do |host| | ||
on hosts, "mkdir -p #{host['distmoduledir']}" | ||
end | ||
end | ||
|
||
RSpec.configure do |c| | ||
# Project root | ||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) | ||
|
||
# Readable test descriptions | ||
c.formatter = :documentation | ||
|
||
# Configure all nodes in nodeset | ||
c.before :suite do | ||
# Install module and dependencies | ||
puppet_module_install(:source => proj_root, :module_name => 'selenium') | ||
hosts.each do |host| | ||
on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } | ||
on host, puppet('module', 'install', 'maestrodev-wget'), { :acceptable_exit_codes => [0,1] } | ||
on host, puppet('module', 'install', 'rodjek-logrotate'), { :acceptable_exit_codes => [0,1] } | ||
on host, puppet('module', 'install', 'puppetlabs-java'), { :acceptable_exit_codes => [0,1] } | ||
end | ||
end | ||
end |
Oops, something went wrong.