-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run acceptance tests on each spec file
this will execute each of them in their own container
- Loading branch information
1 parent
d3045fb
commit c0cb2d0
Showing
3 changed files
with
95 additions
and
59 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 |
---|---|---|
@@ -1,34 +1,36 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'with specific php version' do | ||
it 'works with 5.6' do | ||
pp = <<-EOS | ||
class { 'php::globals': | ||
php_version => '5.6', | ||
} | ||
-> class { 'php': | ||
ensure => 'present', | ||
manage_repos => true, | ||
fpm => true, | ||
dev => true, | ||
composer => true, | ||
pear => true, | ||
phpunit => false, | ||
} | ||
EOS | ||
# 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('php5.6-fpm') do | ||
it { is_expected.to be_installed } | ||
context 'with params' do | ||
it 'works with 5.6' do | ||
pp = <<-EOS | ||
class { 'php::globals': | ||
php_version => '5.6', | ||
} | ||
-> class { 'php': | ||
ensure => 'present', | ||
manage_repos => true, | ||
fpm => true, | ||
dev => true, | ||
composer => true, | ||
pear => true, | ||
phpunit => false, | ||
} | ||
EOS | ||
# Run it twice and test for idempotency | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
when %r{14.04} | ||
describe package('php5.6-fpm') do | ||
it { is_expected.to be_installed } | ||
|
||
case default[:platform] | ||
when %r{16.04} | ||
describe package('php5.6-fpm') do | ||
it { is_expected.to be_installed } | ||
end | ||
when %r{14.04} | ||
describe package('php5.6-fpm') do | ||
it { is_expected.to be_installed } | ||
end | ||
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 |
---|---|---|
@@ -1,25 +1,27 @@ | ||
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 } | ||
describe 'php with default settings' do | ||
context 'default parameters' 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 | ||
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 } | ||
|
||
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 | ||
end |