David Pell
155995adfd
In ApacheConf#include_files, check for abs paths
...
If the path is absolute, just use what was passed, otherwise build an
absolute path using `@conf_dir`.
Fixes #1013
2016-09-20 09:11:09 -04:00
Christoph Hartmann
a2143b8249
identify enabled/disabled accounts for windows
2016-09-12 11:40:25 +02:00
Christoph Hartmann
e61f71143d
add unit tests
2016-09-09 12:43:03 +02:00
Steven Danna
7e8f3f571e
Ensure simplecov starts before everything else
...
Before this change, simplecov was reporting
1864 / 5198 LOC (35.86%) covered
After this change it is reporting
4131 / 5275 LOC (78.31%) covered.
Keeping the require at the top of the file ensure that simplecov is
loaded before any of our application code.
2016-09-08 21:32:15 +01:00
Christoph Hartmann
73f93c2756
fix powershell based unit tests
2016-09-05 13:36:48 +02:00
Christoph Hartmann
3346d7e1a9
support /etc/init.d directory for run level configuration
2016-09-05 11:08:21 +02:00
Steven Danna
5fdf659df1
Load all dependent libraries, even if include_context isn't called
...
The goal of these changes is to ensure that the libraries from
dependencies are loaded even if their controls are never included. To
facilitate this, we break up the loading into seperate steps, and move
the loading code into the Profile which has acceess to the dependency
information.
Signed-off-by: Steven Danna <steve@chef.io>
2016-09-04 20:55:20 +02:00
Jeremy J. Miller
1b92d15d8f
added unit tests
2016-09-02 21:55:28 -04:00
Martin Hegarty
ffee9bd2fc
Fix failing unit test
2016-08-31 16:56:23 +01:00
Christoph Hartmann
956d3b7292
add unit test for new package resource
2016-08-24 14:40:26 +02:00
Dominik Richter
5f1d83f196
Merge pull request #912 from chef/ap/port-win-process
...
Windows ports with pid and process name
2016-08-12 20:59:28 +02:00
Alex Pop
353dcf10ec
make netstat default for getting ports and get only listening ones
2016-08-12 16:02:56 +01:00
Christoph Hartmann
57bdd3464c
add feature to fetch children from registry key
2016-08-12 14:51:23 +02:00
Christoph Hartmann
d9a1a500d0
add params and content method to parse_config
2016-08-05 12:13:56 +02:00
Steven Danna
57d7275857
Update inspec for os[:family] change in Train
...
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-04 13:32:35 +01:00
Dominik Richter
70dd639471
move base_cli to lib/inspec
...
It is not a disconnected library, but a core component of inspec. Fix its location.
2016-07-26 20:11:25 +02:00
Dominik Richter
c2f34932ad
add port resource for windows 2008
...
using `netstat -an`
2016-07-21 14:58:43 +02:00
Christoph Hartmann
9bdb01f1d5
improve wmi resource
2016-06-19 23:40:45 +02:00
Christoph Hartmann
e9ca7107b0
add tests for os resource
2016-05-31 00:01:26 +02:00
tpcwang
c8d2991589
Escape os_env command on Windows to handle env variables containing parentheses.
...
Update the mock file to match the new command
2016-05-11 01:09:06 -07:00
Victoria Jeffrey
1811eb6666
Expose label for processes only on linux
2016-05-10 13:59:13 -04:00
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