mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Doc fixes the apache_conf properties returns an array (#2479)
* Fixes the apache_conf Listen property returns an array The result is an array and not a string even when there is one value. Signed-off-by: Franklin Webber <franklin@chef.io> * Updates the apache_conf timeout, allowoverride, and maxclients to include It seems that all of these values are placed in an array of values so the matcher needs to be `include`. Signed-off-by: Franklin Webber <franklin@chef.io> * Updates docs for apache_conf * Uses the suggested `cmp` instead of `include` * Adds the way to properly compare a list of multiple ports Signed-off-by: Franklin Webber <franklin@chef.io>
This commit is contained in:
parent
f57e2050ca
commit
2cc446a686
1 changed files with 11 additions and 5 deletions
|
@ -31,13 +31,19 @@ The following examples show how to use this InSpec audit resource.
|
|||
### Test for blocking .htaccess files on CentOS
|
||||
|
||||
describe apache_conf do
|
||||
its('AllowOverride') { should eq 'None' }
|
||||
its('AllowOverride') { should cmp 'None' }
|
||||
end
|
||||
|
||||
### Test ports for SSL
|
||||
|
||||
describe apache_conf do
|
||||
its('Listen') { should eq '443'}
|
||||
its('Listen') { should cmp '443' }
|
||||
end
|
||||
|
||||
### Test multiple ports are listening
|
||||
|
||||
describe apache_conf do
|
||||
its('Listen') { should =~ [ '80', '443' ] }
|
||||
end
|
||||
|
||||
<br>
|
||||
|
@ -51,11 +57,11 @@ This InSpec audit resource matches any service that is listed in the Apache conf
|
|||
|
||||
or:
|
||||
|
||||
its('Timeout') { should eq 300 }
|
||||
its('Timeout') { should cmp '300' }
|
||||
|
||||
For example:
|
||||
|
||||
describe apache_conf do
|
||||
its('MaxClients') { should eq 100 }
|
||||
its('Listen') { should eq '443'}
|
||||
its('MaxClients') { should cmp '100' }
|
||||
its('Listen') { should cmp '443' }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue