Commit graph

114 commits

Author SHA1 Message Date
Anirudh Gupta
738ef69bcf prefixed hpux to cmd file name 2016-05-03 21:38:39 +05:30
Anirudh Gupta
d839f218bf hpux support for basic port properties 2016-05-03 14:30:59 +05:30
Anirudh Gupta
75534fdaa5 added hpux user and package resource support 2016-04-21 14:01:56 +05:30
Thomas Cate
3051ead64d added tests for grub_conf resource 2016-04-17 10:46:29 -04:00
Jacob McCann
9dbf5354e5 Add 'static' value as enabled to systemd service enabled check 2016-04-13 14:44:28 -05:00
Christoph Hartmann
cd57b26bd0 wmi unit test 2016-03-20 11:53:56 +01:00
Dominik Richter
b7e438eabc add a mock fetcher 2016-03-17 23:37:09 +01:00
Dominik Richter
f7c2fa4392 functional tests for inspec detect + version + exec 2016-03-17 10:21:38 +01:00
Adam Leff
577688a3a0 Placing all resources in the Inspec::Resources namespace
Many of the resources are named as a top-level class with a fairly generic class name, such as "OS". This causes an issue specifically with kitchen-google which depends on a gem which depends on the "os" gem which itself defines an OS class with a different superclass. This prevents users from using TK, Google Compute, and Inspec without this fix.

Some mocked commands had their digest changed as well due to the new indentation, specifically in the User and RegistryKey classes.

I strongly recommend viewing this diff with `git diff --ignore-space-change`
to see the *real* changes. :)
2016-03-08 13:40:16 -05:00
Dominik Richter
4a39275fc0 add xinetd_conf resource 2016-02-26 13:19:16 +01:00
Stephan Renatus
c891686d72 tests: create a temporary name, not a Tempfile
rubyzip also does use Tempfile under the hood, this causes trouble.
2016-02-22 13:41:12 +01:00
Dominik Richter
d065794d96 remove old target interface 2016-02-22 12:06:42 +01:00
Dominik Richter
1e1e473cb0 replace target-helper with fetcher+reader 2016-02-22 11:24:35 +01:00
Dominik Richter
125ee53041 create source_reader plugin structure 2016-02-22 11:24:35 +01:00
Dominik Richter
bd77602695 bugfix: prevent test helper from prematurely deleting tmp-files 2016-02-22 11:24:35 +01:00
Dominik Richter
27f7aa7796 create new fetcher system 2016-02-22 11:24:35 +01:00
Dominik Richter
1e096c7181 add shadow resource for /etc/shadow 2016-02-19 14:26:04 +01:00
Christoph Hartmann
26276ca991 use ruby zip and tar for unit tests 2016-02-18 14:27:16 +01:00
Dominik Richter
b8cce5d3c7 create zip for test helper in ruby
The zip command is not always there. (e.g. i dont have it on my box). just use the available zip library
2016-02-18 14:25:55 +01:00
Dominik Richter
509088ba5d share test helpers for loading profile archives 2016-02-18 14:25:55 +01:00
Stephan Renatus
664561aa80 auditd_rules: status querying (old/new) and unit tests
TODO: unit tests for the legacy format
2016-02-09 11:51:52 +01:00
Dominik Richter
ac6d7fb76f fix unit tests for winrm 1.6.1 command scheme 2016-02-09 11:05:36 +01:00
Christoph Hartmann
b7a88dbd7a fix linting and unit test 2016-02-05 16:57:51 +01:00
Christoph Hartmann
f826c07af5 minor improvements 2016-02-05 14:55:12 +01:00
Stephan Renatus
688709356c upstart_service: add version mock for ubuntu 2016-02-05 13:49:18 +01:00
Dominik Richter
34bc94d13f mock resource operating systems for tests 2016-01-29 21:55:08 +01:00
Christoph Hartmann
62844eee0c add unit tests 2016-01-28 18:30:38 +01:00
Stephan Renatus
7a308806aa unit tests: add systemd_service instance with overridden service_ctl 2016-01-21 11:41:48 +01:00
Jeremy W. Chalfant
a2ea1da6e3 move all lsof to formmated output (-F) 2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
b363e1d147 formatted lsof mockup 2016-01-14 23:03:24 -05:00
Stephan Renatus
5c17f8b643 regexp github url targets, add tests for Inspec::Targests::UrlHelper
replacing occuring http:// with https:// is probably ok, github
redirects to https anyways
2016-01-14 12:05:58 -05:00
Christoph Hartmann
a72ba94f10 handle mount results with multiple entries 2016-01-03 00:03:24 +01:00
Christoph Hartmann
a5acb03e49 add mount resource 2016-01-03 00:03:24 +01:00
Jeremy J. Miller
7c279c7d04 helper.rb now reflects the new commands in the security_policy resource 2015-12-17 10:08:28 -05:00
Adam Leff
c146a76679 File permission checks should return false unless file exists
Currently, #readable?, #writeable?, and #executable? will incorrectly
return true if the file does not exist.

In addition, I took the opportunity to refactor the File resource to
make it easier to write unit tests and supplied a full unit test
suite for this resource.
2015-12-08 19:57:34 +01:00
Stephan Renatus
79f48afa6c [resources/apache_conf]: add tests, fix bug
before, the resource would throw an exception when include_files
returned nil (i.e., [].flatten!)

added basic unit tests capturing the include_files behaviour
2015-12-07 10:50:48 +01:00
Adam Leff
e0c356dae7 Adding support for Wind River Linux
WRL is used as the OS on Cisco Nexus devices and acts like a Red
Hat variant. These changes add support for WRL.
2015-12-03 17:41:11 -05:00
Christoph Hartmann
9231833cad add unit tests for user resource that cover ldap groups 2015-11-24 18:35:10 +01:00
Christoph Hartmann
0531976a40 implement unit tests for ini resource 2015-11-24 16:46:17 +01:00
Seth Chisamore
beade346bf Add Windows support to the os_env resource
This change allows checks like:

```
describe os_env('PATH') do
  its('split') { should include('C:\wix') }
end
```
2015-11-19 15:41:00 +01:00
Christoph Hartmann
38e982709e update unit test 2015-11-17 22:28:11 +01:00
Dominik Richter
17ce88b63d api: don't force root on os_env 2015-11-13 12:10:22 +01:00
Dominik Richter
32e5e3ec29 move to symbols-based fields in profile params 2015-10-27 02:29:11 +01:00
Dominik Richter
b58a4b3f43 rename vulcanosec -> inspec 2015-10-26 12:34:15 +01:00
Dominik Richter
56b88cba1d create factory for backend creation 2015-10-15 22:42:06 +02:00
Dominik Richter
132019a6d9 move backend creation to profile context
keeping it in the runner will create conflicts with rspec runners
2015-10-14 23:44:15 +02:00
Dominik Richter
be614e9056 migrate backend to Train project 2015-10-14 23:13:49 +02:00
Christoph Hartmann
128eb4a7f6 add tests for iptables 2015-10-12 10:34:24 +02:00
Christoph Hartmann
9774ec7984 add test coverage for apt 2015-10-10 23:28:03 +02:00
Christoph Hartmann
1dec6a60b8 remove ruby warnings in helper 2015-10-09 19:55:16 +02:00