Merge pull request #4805 from inspec/maryj/CodeExUpdate

Update for Chef InSpec Resource Code Examples
This commit is contained in:
Ryan Davis 2020-01-15 14:15:07 -08:00 committed by GitHub
commit 1f77cb1369
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 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 [
0.ubuntu.pool.ntp.org,
1.ubuntu.pool.ntp.org,
2.ubuntu.pool.ntp.org
] }
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>