Refactors the bridge property (#2505)

Signed-off-by: kagarmoe <kgarmoe@chef.io>
This commit is contained in:
Kimberly Garmoe 2018-02-01 14:45:33 -08:00 committed by Adam Leff
parent c9a226c4ab
commit 16325b8a9b

View file

@ -6,9 +6,6 @@ title: About the bridge Resource
Use the `bridge` InSpec audit resource to test basic network bridge properties, such as name, if an interface is defined, and the associations for any defined interface.
* On Linux platforms, any value in the `/sys/class/net/{interface}/bridge` directory may be tested
* On the Windows platform, the `Get-NetAdapter` cmdlet is associated with the `Get-NetAdapterBinding` cmdlet and returns the `ComponentID ms_bridge` value as a JSON object
<br>
## Syntax
@ -22,6 +19,23 @@ A `bridge` resource block declares the bridge to be tested and what interface it
<br>
## Supported Properties
* On Linux platforms, any value in the `/sys/class/net/{interface}/bridge` directory may be tested
* On the Windows platform, the `Get-NetAdapter` cmdlet is associated with the `Get-NetAdapterBinding` cmdlet and returns the `ComponentID ms_bridge` value as a JSON object
<br>
## Property Examples
### interfaces
The `interfaces` property tests if the named interface is present:
its('interfaces') { should eq 'foo' }
its('interfaces') { should eq 'bar' }
its('interfaces') { should include('foo') }
## Matchers
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
@ -38,10 +52,3 @@ The `have_interface` matcher tests if the named interface is defined for the net
it { should have_interface 'eth0' }
### interfaces
The `interfaces` matcher tests if the named interface is present:
its('interfaces') { should eq 'foo' }
its('interfaces') { should eq 'bar' }
its('interfaces') { should include('foo') }