Skip to content

Commit

Permalink
Updates docs for apache_conf
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Franklin Webber committed Jan 25, 2018
1 parent 1b2d8ee commit 4bb55cb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/resources/apache_conf.md.erb
Expand Up @@ -37,7 +37,13 @@ The following examples show how to use this InSpec audit resource.
### Test ports for SSL

describe apache_conf do
its('Listen') { should include '443' }
its('Listen') { should cmp '443' }
end

### Test multiple ports are listening

describe apache_conf do
its('Listen') { should =~ [ '80', '443' ] }
end

<br>
Expand All @@ -51,11 +57,11 @@ This InSpec audit resource matches any service that is listed in the Apache conf

or:

its('Timeout') { should include '300' }
its('Timeout') { should cmp '300' }

For example:

describe apache_conf do
its('MaxClients') { should include '100' }
its('Listen') { should include '443' }
its('MaxClients') { should cmp '100' }
its('Listen') { should cmp '443' }
end

0 comments on commit 4bb55cb

Please sign in to comment.