forked from velaluqa/puppet-phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure beaker with rspec for acceptance tests
- Loading branch information
Showing
6 changed files
with
53 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HOSTS: | ||
debian-73-x64-virtualbox-puppet: | ||
roles: | ||
- master | ||
platform: debian-7-amd64 | ||
box : debian-73-x64-virtualbox-puppet | ||
box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-puppet.box | ||
hypervisor : vagrant | ||
distmoduledir: /etc/puppet/modules |
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_acceptance' | ||
|
||
describe 'phpmyadmin class' do | ||
describe 'running puppet code' do | ||
it 'should work without errors' do | ||
pp = 'class { \'phpmyadmin\': }' | ||
|
||
# Run it twice and test for idempotency | ||
apply_manifest(pp, :catch_failures => true) | ||
expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero | ||
end | ||
|
||
it 'should create config from template correctly' | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
require 'beaker-rspec' | ||
require 'pry' | ||
|
||
hosts.each do |host| | ||
# Install Puppet | ||
install_package host, 'rubygems' | ||
on host, 'gem install puppet --no-ri --no-rdoc' | ||
on host, "mkdir -p #{host['distmoduledir']}" | ||
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 | ||
puppet_module_install(:source => proj_root, :module_name => 'phpmyadmin') | ||
hosts.each do |host| | ||
on host, puppet('module','install','puppetlabs-vcsrepo'), { :acceptable_exit_codes => [0,1] } | ||
end | ||
end | ||
end |