Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added info.php in a different recipe to avoid copy paste
- Loading branch information
1 parent
3bb4eb8
commit a22ef14
Showing
6 changed files
with
59 additions
and
20 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
# | |||
# Cookbook:: . | |||
# Recipe:: phppage | |||
# | |||
# Copyright:: 2021, The Authors, All Rights Reserved. | |||
|
|||
# Create a info.php page | |||
file '/var/www/html/info.php' do | |||
content '<?php phpinfo(); ?>' | |||
action :create | |||
end |
29 changes: 29 additions & 0 deletions
29
Jan21/cookbooks/qtlampserver/spec/unit/recipes/phppage_spec.rb
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
# | |||
# Cookbook:: . | |||
# Spec:: phppage | |||
# | |||
# Copyright:: 2021, The Authors, All Rights Reserved. | |||
|
|||
require 'spec_helper' | |||
|
|||
describe '.::phppage' do | |||
context 'When all attributes are default, on Ubuntu 18.04' do | |||
# for a complete list of available platforms and versions see: | |||
# https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md | |||
platform 'ubuntu', '18.04' | |||
|
|||
it 'converges successfully' do | |||
expect { chef_run }.to_not raise_error | |||
end | |||
end | |||
|
|||
context 'When all attributes are default, on CentOS 7' do | |||
# for a complete list of available platforms and versions see: | |||
# https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md | |||
platform 'centos', '7' | |||
|
|||
it 'converges successfully' do | |||
expect { chef_run }.to_not raise_error | |||
end | |||
end | |||
end |
16 changes: 16 additions & 0 deletions
16
Jan21/cookbooks/qtlampserver/test/integration/default/phppage_test.rb
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
# InSpec test for recipe .::phppage | |||
|
|||
# The InSpec reference, with examples and extensive documentation, can be | |||
# found at https://www.inspec.io/docs/reference/resources/ | |||
|
|||
unless os.windows? | |||
# This is an example test, replace with your own test. | |||
describe user('root'), :skip do | |||
it { should exist } | |||
end | |||
end | |||
|
|||
# This is an example test, replace it with your own test. | |||
describe port(80), :skip do | |||
it { should_not be_listening } | |||
end |