2014-05-14 14:46:12 +00:00
|
|
|
tests-os-hardening
|
|
|
|
==================
|
2014-05-15 18:57:44 +00:00
|
|
|
|
|
|
|
This are the integration tests for the projects
|
|
|
|
|
|
|
|
- https://github.com/TelekomLabs/puppet-os-hardening
|
|
|
|
- https://github.com/TelekomLabs/chef-os-hardening
|
|
|
|
|
|
|
|
they start at `integration` level
|
|
|
|
|
|
|
|
you can use the gem `kitchen-sharedtests`
|
|
|
|
|
|
|
|
- https://github.com/ehaselwanter/kitchen-sharedtests/
|
|
|
|
|
|
|
|
to make them available to your project. Use `thor kitchen:fetch-remote-tests` to put the repo into `test/integration`
|
2014-06-05 08:50:37 +00:00
|
|
|
|
|
|
|
## Standalone Usage
|
|
|
|
|
|
|
|
you can target the integration tests to any host were you have ssh access
|
|
|
|
|
|
|
|
rake -T gives you a list of suites you can run (well ignore directories which are obviously not suites for now)
|
|
|
|
|
|
|
|
```
|
|
|
|
± rake -T
|
|
|
|
rake serverspec:data_bags # Run serverspec suite data_bags
|
|
|
|
rake serverspec:default # Run serverspec suite default
|
|
|
|
```
|
|
|
|
|
|
|
|
run it with:
|
|
|
|
|
|
|
|
```
|
|
|
|
bundle install
|
|
|
|
|
|
|
|
# default user and ssh-key
|
|
|
|
|
|
|
|
bundle exec rake serverspec:default target_host=<name-or-ip-of-target-server>
|
|
|
|
|
|
|
|
# or with user, host, password
|
|
|
|
|
|
|
|
ASK_LOGIN_PASSWORD=true bundle exec rake serverspec:default target_host=192.168.1.222 user=stack
|
|
|
|
```
|
|
|
|
|
2015-01-14 12:37:40 +00:00
|
|
|
add `format=html|json` to get a report.html or report.json document
|
2014-06-05 08:50:37 +00:00
|
|
|
|