-
-
Notifications
You must be signed in to change notification settings - Fork 267
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 #414 from bastelfreak/acceptance
Add Acceptance tests
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
--- | ||
.travis.yml: | ||
docker_sets: | ||
- set: docker/ubuntu-16.04 | ||
- set: docker/ubuntu-14.04 | ||
- set: docker/centos-7 | ||
- set: docker/debian-8 | ||
secure: "GOhttACuJt+3s38m4WnW5RuTgwqaAoeEQnNT+X1Ukn7KdcIk4KV8NzYU/CC0VIm8lUOnBWYJKEC4ixX/J/4Wbxox2RAoKMQrO++L0DB1zTCJnq9SfoUBMaQhXvLu+PbxAR0p3P47ozra0C+pOWDpOaxT9ecufrPQt9W9Z4aY/bs=" |
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,25 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'php' do | ||
it 'works with defaults' do | ||
pp = 'include php' | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
case default[:platform] | ||
when %r{16.04} | ||
describe package('php7.0-fpm') do | ||
it { is_expected.to be_installed } | ||
end | ||
when %r{14.04} | ||
describe package('php5-fpm') do | ||
it { is_expected.to be_installed } | ||
end | ||
when %(7) | ||
describe package('php-fpm') do | ||
it { is_expected.to be_installed } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'beaker-rspec' | ||
require 'beaker/puppet_install_helper' | ||
require 'beaker/module_install_helper' | ||
|
||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' | ||
install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i | ||
install_module_on(hosts) | ||
install_module_dependencies_on(hosts) | ||
|
||
RSpec.configure do |c| | ||
# Readable test descriptions | ||
c.formatter = :documentation | ||
hosts.each do |host| | ||
if host[:platform] =~ %r{el-7-x86_64} && host[:hypervisor] =~ %r{docker} | ||
on(host, "sed -i '/nodocs/d' /etc/yum.conf") | ||
end | ||
end | ||
end |