Skip to content

Commit

Permalink
Merge pull request #239 from petems/refactor_to_use_beaker
Browse files Browse the repository at this point in the history
Refactor acceptance tests to use beaker-rspec
  • Loading branch information
R. Tyler Croy committed Jan 29, 2015
2 parents 470b9d6 + 9264739 commit c7211f3
Show file tree
Hide file tree
Showing 26 changed files with 217 additions and 258 deletions.
17 changes: 5 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@ group :development do
gem 'debugger', :platform => :mri_19
gem 'debugger-pry', :platform => :mri_19
gem 'byebug', :platform => [:mri_20, :mri_21]

gem 'serverspec'
gem 'vagrant', :github => 'mitchellh/vagrant',
:ref => 'v1.6.5',
:platform => [:mri_19, :mri_21]
end

# Vagrant plugins
group :plugins do
gem 'vagrant-aws', :github => 'mitchellh/vagrant-aws',
:platform => [:mri_19, :mri_21]
gem 'vagrant-serverspec', :github => 'jvoorhis/vagrant-serverspec',
:platform => [:mri_19, :mri_21]
end
group :system_tests do
gem 'beaker-rspec', :require => false
gem 'serverspec', :require => false
gem 'vagrant-wrapper',:require => false
end
32 changes: 0 additions & 32 deletions features/deb_support.feature

This file was deleted.

65 changes: 0 additions & 65 deletions features/step_definitions/deb_support_steps.rb

This file was deleted.

12 changes: 0 additions & 12 deletions features/support/boxes/deb/Vagrantfile

This file was deleted.

9 changes: 0 additions & 9 deletions features/support/boxes/deb/install-puppet-module.sh

This file was deleted.

14 changes: 0 additions & 14 deletions features/support/boxes/deb/verify-jenkins-install

This file was deleted.

13 changes: 0 additions & 13 deletions features/support/boxes/deb/verify-plugin-install

This file was deleted.

4 changes: 0 additions & 4 deletions features/support/env.rb

This file was deleted.

44 changes: 0 additions & 44 deletions features/support/vagrant.rb

This file was deleted.

35 changes: 35 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require 'spec_helper_acceptance'

describe 'jenkins class' do

context 'default parameters' do
it 'should work with no errors' do
pp = <<-EOS
class {'jenkins':
cli => true,
}
EOS

# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end

describe port(8080) do
it {
sleep(10) # Jenkins takes a while to start up
should be_listening
}
end

describe file('/usr/share/jenkins/jenkins-cli.jar') do
it { should be_file }
end

describe service('jenkins') do
it { should be_running }
it { should be_enabled }
end

end
end
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/centos-59-x64.yml
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
12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/centos-64-x64-pe.yml
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
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/centos-65-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
HOSTS:
centos-65-x64:
roles:
- master
platform: el-6-x86_64
box : centos-65-x64-vbox436-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box
hypervisor : vagrant
CONFIG:
type: foss
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/debian-70rc1-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
HOSTS:
debian-70rc1-x64:
roles:
- master
platform: debian-70rc1-x64
box : debian-70rc1-x64-vbox4210-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box
hypervisor : vagrant
CONFIG:
type: foss
11 changes: 11 additions & 0 deletions spec/acceptance/nodesets/debian-73-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HOSTS:
debian-73-x64:
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: git
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/default.yml
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
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/ubuntu-server-10044-x64.yml
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
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/ubuntu-server-12.04-am65-fog-aws.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOSTS:
ubuntu-12.04-amd64-fog-aws:
roles:
- master
platform: ubuntu-12.04-amd64
image_id: ami-20bd1f57 # Ubuntu 12.04
flavor_id: t1.micro
cloud_provider: AWS
# Amazon AMI uses ubuntu user
amazon_user: ubuntu
aws_region: 'eu-west-1'
aws_access_key_id: ENV['AWS_ACCESS_KEY_ID']
aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
hypervisor : fog
CONFIG:
type: git
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/ubuntu-server-12042-x64.yml
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
11 changes: 11 additions & 0 deletions spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
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
Loading

0 comments on commit c7211f3

Please sign in to comment.