Update for InSpec Resource Code Examples

Signed-off-by: Mary Jinglewski <mjinglewski@chef.io>
This commit is contained in:
Mary Jinglewski 2019-12-19 12:55:44 -05:00
parent d4481b82fb
commit c45b4736ba
2 changed files with 8 additions and 4 deletions

View file

@ -43,11 +43,13 @@ The following examples show how to use this Chef InSpec audit resource.
describe ntp_conf do
its('driftfile') { should eq '/var/lib/ntp/ntp.drift' }
its('server') { should eq [
its('server') do
should eq [
0.ubuntu.pool.ntp.org,
1.ubuntu.pool.ntp.org,
2.ubuntu.pool.ntp.org
] }
]
end
end
<br>

View file

@ -69,11 +69,13 @@ The following examples show how to use this Chef InSpec audit resource.
its('Port') { should cmp 22 }
its('UsePAM') { should eq 'yes' }
its('ListenAddress') { should eq nil }
its('HostKey') { should eq [
its('HostKey') do
should eq [
'/etc/ssh/ssh_host_rsa_key',
'/etc/ssh/ssh_host_dsa_key',
'/etc/ssh/ssh_host_ecdsa_key',
] }
]
end
end
<br>