mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Merge pull request #978 from nvtkaszpir/patch-1
Update port.rb Documentation
This commit is contained in:
commit
8de1b9fe7b
1 changed files with 1 additions and 11 deletions
|
@ -5,17 +5,6 @@
|
|||
require 'utils/parser'
|
||||
require 'utils/filter'
|
||||
|
||||
# Usage:
|
||||
# describe port(80) do
|
||||
# it { should be_listening }
|
||||
# its('protocol') {should eq 'tcp'}
|
||||
# end
|
||||
#
|
||||
# not supported serverspec syntax
|
||||
# describe port(80) do
|
||||
# it { should be_listening.with('tcp') }
|
||||
# end
|
||||
#
|
||||
# TODO: currently we return local ip only
|
||||
# TODO: improve handling of same port on multiple interfaces
|
||||
module Inspec::Resources
|
||||
|
@ -26,6 +15,7 @@ module Inspec::Resources
|
|||
describe port(80) do
|
||||
it { should be_listening }
|
||||
its('protocols') {should eq ['tcp']}
|
||||
its('addresses') {should eq ['127.0.0.1']}
|
||||
end
|
||||
|
||||
describe port.where { protocol =~ /tcp/ && port > 80 } do
|
||||
|
|
Loading…
Reference in a new issue