Skip to content

Commit

Permalink
acceptance: Clean spec file and use ubuntu 14.04 for default tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbadia committed Jul 11, 2015
1 parent 91a71d8 commit 8325dfb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end

group :system_tests do
gem 'beaker-rspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
Expand Down
13 changes: 7 additions & 6 deletions spec/acceptance/nodesets/default.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
HOSTS:
debian-73-x64:
ubuntu-server-1404-x64:
roles:
- master
platform: debian-7-amd64
box : debian-73-x64-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box
hypervisor : vagrant
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:
type: foss
log_level: debug
type: git
16 changes: 10 additions & 6 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
require 'beaker-rspec'
require 'beaker/puppet_install_helper'

hosts.each do |host|
install_puppet
on host, "mkdir -p #{host['distmoduledir']}"
end
run_puppet_install_helper

RSpec.configure do |c|
# Project root
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
modname = JSON.parse(open('metadata.json').read)['name'].split('-')[1]

# Readable test descriptions
c.formatter = :documentation

# Configure all nodes in nodeset
c.before :suite do

# Install module
puppet_module_install(:source => proj_root, :module_name => 'gitlab')
#
puppet_module_install(:source => proj_root, :module_name => modname)
hosts.each do |host|
on host, puppet('module','install','alup/rbenv'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','fsalum/redis'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','jfryman/nginx'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','evenup/logrotate'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','puppetlabs-git'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','puppetlabs-vcsrepo'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','puppetlabs-mysql', '--version', '2.2'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','puppetlabs-mysql'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }

# List modules installed to help with debugging
on host, puppet('module','list'), { :acceptable_exit_codes => [0] }
end
end
end

0 comments on commit 8325dfb

Please sign in to comment.