Merge pull request #1833 from chef/adamleff/fix-interface-docs

Update interface resource docs
This commit is contained in:
Christoph Hartmann 2017-05-29 15:30:53 -04:00 committed by GitHub
commit 93f1c55782
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ title: About the interface Resource
# interface
Use the `interface` InSpec audit resource to test basic network adapter properties, such as name, status, state, address, and link speed (in MB/sec).
Use the `interface` InSpec audit resource to test basic network adapter properties, such as name, status, and link speed (in MB/sec).
* On Linux platforms, `/sys/class/net/#{iface}` is used as source
* On the Windows platform, the `Get-NetAdapter` cmdlet is used as source
@ -13,7 +13,7 @@ Use the `interface` InSpec audit resource to test basic network adapter properti
An `interface` resource block declares network interface properties to be tested:
describe interface do
describe interface('eth0') do
it { should be_up }
its('speed') { should eq 1000 }
its('name') { should eq eth0 }

View file

@ -7,7 +7,7 @@ require 'utils/convert'
module Inspec::Resources
class NetworkInterface < Inspec.resource(1)
name 'interface'
desc 'Use the interface InSpec audit resource to test basic network adapter properties, such as name, status, state, address, and link speed (in MB/sec).'
desc 'Use the interface InSpec audit resource to test basic network adapter properties, such as name, status, and link speed (in MB/sec).'
example "
describe interface('eth0') do
it { should exist }