-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add tests for php5.6 #418
Merged
Merged
add tests for php5.6 #418
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6ca17a4
add tests for php5.6
bastelfreak d3045fb
fix the ubuntu16.04 nodeset
bastelfreak c0cb2d0
run acceptance tests on each spec file
bastelfreak 3412e96
add acceptance tests to modulesync config
bastelfreak eb6fcdb
use modulesync to generate acceptance tests
bastelfreak 4544b3b
restructure php56 acceptance tests
bastelfreak 2b970d7
cleanup php7 acceptance test
bastelfreak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -10,8 +10,11 @@ HOSTS: | |
docker_preserve_image: true | ||
docker_cmd: '["/sbin/init"]' | ||
docker_image_commands: | ||
- 'systemctl mask [email protected] getty-static.service' | ||
- 'apt-get update' | ||
- 'apt-get install -y net-tools wget locales apt-transport-https' | ||
- 'locale-gen en_US.UTF-8' | ||
- 'echo LANG=en_US.UTF-8 > /etc/default/locale' | ||
CONFIG: | ||
trace_limit: 200 | ||
masterless: true | ||
|
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,47 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'with specific php version' do | ||
case default[:platform] | ||
when %r{ubuntu} | ||
packagename = 'php5.6-fpm' | ||
when %r{el} | ||
# ell = Enterprise Linux = CentOS.... | ||
packagename = 'php-fpm' | ||
when %r{debian} | ||
packagename = 'php5-fpm' | ||
end | ||
|
||
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 | ||
|
||
describe package(packagename) do | ||
it { is_expected.to be_installed } | ||
end | ||
describe service(packagename) do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
describe command('php --version') do | ||
its(:stdout) { is_expected.to match %r{5\.6} } | ||
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,31 @@ | ||
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 | ||
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 | ||
|
||
case default[:platform] | ||
when %r{16.04} | ||
describe package('php7.0-fpm') do | ||
it { is_expected.to be_installed } | ||
case default[:platform] | ||
when %r{ubuntu-16.04} | ||
packagename = 'php7.0-fpm' | ||
when %r{ubuntu-14.04} | ||
packagename = 'php5-fpm' | ||
when %r{el} | ||
packagename = 'php-fpm' | ||
when %r{debian} | ||
packagename = 'php5-fpm' | ||
end | ||
when %r{14.04} | ||
describe package('php5-fpm') do | ||
describe package(packagename) do | ||
it { is_expected.to be_installed } | ||
end | ||
when %(7) | ||
describe package('php-fpm') do | ||
it { is_expected.to be_installed } | ||
|
||
describe service(packagename) do | ||
it { is_expected.to be_running } | ||
it { is_expected.to be_enabled } | ||
end | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a check for
php --version
?