mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
extend docs introduction
This commit is contained in:
parent
a8cdb53e45
commit
ebeac09036
1 changed files with 15 additions and 1 deletions
|
@ -44,7 +44,7 @@ It will contain:
|
|||
|
||||
# Skip all rules, if SSH doesn't exist on the system
|
||||
only_if do
|
||||
command('sshd').exists?
|
||||
command('sshd').exist?
|
||||
end
|
||||
|
||||
rule "sshd-11" do
|
||||
|
@ -71,3 +71,17 @@ It will contain:
|
|||
its('PermitRootLogin') { should match(/no|without-password/) }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Now, we are ready to run the tests locally:
|
||||
|
||||
bundle exec bin/inspec exec demo/test/example_spec.rb
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# run tests individually
|
||||
$ inspec exec test/example_spec.rb
|
||||
$ inspec exec test/sshd_spec.rb
|
||||
|
||||
# if you want to run all test located within the directory
|
||||
$ inspec exec ./test
|
||||
|
|
Loading…
Add table
Reference in a new issue