Merge pull request #978 from nvtkaszpir/patch-1

Update port.rb Documentation
This commit is contained in:
Christoph Hartmann 2016-08-26 09:12:35 +02:00 committed by GitHub
commit 8de1b9fe7b

View file

@ -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