-
-
Notifications
You must be signed in to change notification settings - Fork 490
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 #119 from awartner/freebsd
Support FreeBSD
- Loading branch information
Showing
7 changed files
with
69 additions
and
6 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,7 +1,6 @@ | ||
site :opscode | ||
source 'https://supermarket.chef.io' | ||
metadata | ||
|
||
group :integration do | ||
cookbook 'apt', '~> 2.0' | ||
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require_relative '../spec_helper' | ||
|
||
describe 'php::default' do | ||
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) } | ||
|
||
context 'on freebsd' do | ||
let(:chef_run) { | ||
ChefSpec::SoloRunner.new(platform: 'freebsd', version: '10.0') | ||
.converge(described_recipe) | ||
} | ||
|
||
it 'installs php' do | ||
expect(chef_run).to install_package('php56') | ||
expect(chef_run).not_to install_package('php5-cgi') | ||
end | ||
|
||
it 'installs pear' do | ||
expect(chef_run).to install_package('pear') | ||
end | ||
|
||
it 'creates /usr/local/etc/php.ini' do | ||
expect(chef_run).to create_template('/usr/local/etc/php.ini').with( | ||
source: 'php.ini.erb', | ||
cookbook: 'php', | ||
owner: 'root', | ||
mode: '0644', | ||
variables: { | ||
directives: {} | ||
} | ||
) | ||
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,20 @@ | ||
require 'serverspec' | ||
|
||
# Required by serverspec | ||
set :backend, :exec | ||
|
||
describe 'PHP' do | ||
|
||
it 'has php' do | ||
expect(command('php -v').exit_status).to eq(0) | ||
end | ||
|
||
it 'has the pear.php.net channel' do | ||
expect(command('pear list-channels').stdout).to include('pear.php.net') | ||
end | ||
|
||
it 'has the pecl.php.net channel' do | ||
expect(command('pear list-channels').stdout).to include('pecl.php.net') | ||
end | ||
|
||
end |