mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
use cmp in port docs instead of eq
Fixes https://github.com/chef/inspec/issues/438 Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
71a4f0d8f0
commit
84a59cab50
1 changed files with 5 additions and 5 deletions
|
@ -75,13 +75,13 @@ The `be_listening` matcher tests if the port is listening for traffic:
|
|||
|
||||
The `pids` matcher tests the process identifiers (PIDs):
|
||||
|
||||
its('pids') { should eq ['27808'] }
|
||||
its('pids') { should cmp 27808 }
|
||||
|
||||
### processes
|
||||
|
||||
The `processes` matcher tests if the named process is running on the system:
|
||||
|
||||
its('processes') { should eq ['syslog'] }
|
||||
its('processes') { should cmp 'syslog' }
|
||||
|
||||
### protocols
|
||||
|
||||
|
@ -101,7 +101,7 @@ The following examples show how to use this InSpec audit resource.
|
|||
|
||||
describe port(80) do
|
||||
it { should be_listening }
|
||||
its('protocols') {should eq ['tcp']}
|
||||
its('protocols') { should cmp 'tcp' }
|
||||
end
|
||||
|
||||
### Test port 80, on a specific address
|
||||
|
@ -123,7 +123,7 @@ or:
|
|||
|
||||
describe port(80) do
|
||||
it { should be_listening }
|
||||
its('protocols') {should eq ['tcp6']}
|
||||
its('protocols') { should cmp 'tcp6' }
|
||||
end
|
||||
|
||||
### Test that only secure ports accept requests
|
||||
|
@ -134,7 +134,7 @@ or:
|
|||
|
||||
describe port(443) do
|
||||
it { should be_listening }
|
||||
its('protocols') {should eq ['tcp']}
|
||||
its('protocols') { should cmp 'tcp' }
|
||||
end
|
||||
|
||||
### Verify port 65432 is not listening
|
||||
|
|
Loading…
Reference in a new issue