Commit graph

316 commits

Author SHA1 Message Date
Dominik Richter
20b138778e bugfix: expose tests for docker unit-tests 2016-01-19 15:48:06 +01:00
Dominik Richter
6cc2575170 bugfix: clean up failed dockerized tests
We need to put those tickets back in the semaphore, otherwise the remaining tests never get executed. doh
2016-01-19 15:48:06 +01:00
Dominik Richter
611487e956 clearly identify legacy profile tests and fix identification 2016-01-19 15:48:06 +01:00
Dominik Richter
8c464965c1 extract example group creation
and restore profile tests that had been completely mocked until now
2016-01-19 15:48:06 +01:00
Dominik Richter
dd2d93fd6f completely separate rspec runner parts 2016-01-19 15:48:06 +01:00
Dominik Richter
4064e63df5 add tests for loading metadata yaml internals 2016-01-15 20:51:34 +01:00
Dominik Richter
acbc345321 make metadata.rb legacy mode consistent for supports
Before introducing InSpec profiles in https://github.com/chef/inspec/pull/252 we had `metadata.rb` keep all information. This included an undisclosed field called `supports`. However, this field was never actually used in practice. So for legacy profiles, this means that `supports` was ignored. In order to keep old profiles running in exactly the way they were before, ignore this field when reading from metadata.rb
2016-01-15 18:58:18 +01:00
Jeremy W. Chalfant
a2ea1da6e3 move all lsof to formmated output (-F) 2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
f9b5ba1505 account for AIX 7.2 etc. 2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
b363e1d147 formatted lsof mockup 2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
59d1849607 aix service tests 2016-01-14 23:03:23 -05:00
Jeremy W. Chalfant
aac258218c more tests 2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
821e95db05 add aix test 2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
bc503f080d rename etc_group to etc_group_spec and etc_group test success on AIX 2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
db43739951 AIX packages 2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
5f7dccc1b4 aix group tests 2016-01-14 23:00:09 -05:00
Jeremy W. Chalfant
26afecf857 add aix user support 2016-01-14 23:00:09 -05:00
Jeremy W. Chalfant
ec8ee25028 aix support for file tests was added to train 2016-01-14 23:00:09 -05:00
Mark Harrison
f5780b69a4 Correctly detect UDP ports on linux
netstat on UDP lines doesn't display a port state (e.g. LISTEN), so make this
field optional when parsing the netstat line.
2016-01-14 22:53:38 -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
Jacob McCann
f25ab3a373 Fix systemd service enabled check 2016-01-11 15:32:33 -06:00
Christoph Hartmann
a1ddbe4cf2 explicitly ignore supports for inspec check 2016-01-10 23:59:57 -05:00
Stephan Renatus
a26dbe146d fix reading profiles bug
For reading the profiles metadata, we're using the train mock backend
through Inspec::Runner. The new `supports` feature never agrees with the
mock backend.

Now, it we figure out if this is a mock class and then just say that it
supports whatever we're asking for.

Tl;dr: there's probably a more beautiful solution to this.

Added a test case, but it fails -- while the command line interface
works fine.
2016-01-07 15:16:49 -08:00
Dominik Richter
5c5ed106dd dummy holder for ex2 creds in kitchen 2016-01-04 03:45:58 +01:00
Christoph Hartmann
b1d6906d16 update readme for aws integration tests 2016-01-04 03:45:58 +01:00
Christoph Hartmann
b24ed632a1 add yml, csv, json and ini to windows integration tests 2016-01-04 03:43:21 +01:00
Christoph Hartmann
a72ba94f10 handle mount results with multiple entries 2016-01-03 00:03:24 +01:00
Christoph Hartmann
e1402a16d9 split integration tests for mount 2016-01-03 00:03:24 +01:00
Christoph Hartmann
50d2ef4db5 add integration tests for mountpoints 2016-01-03 00:03:24 +01:00
Christoph Hartmann
a5acb03e49 add mount resource 2016-01-03 00:03:24 +01:00
Christoph Hartmann
c7b7eccb5d update unit test for new parser 2016-01-03 00:03:24 +01:00
Christoph Hartmann
167aa6bdfb add test for unsupported os 2016-01-02 21:27:40 +01:00
Dominik Richter
d6f48d3534 catch empty support clause 2015-12-31 17:57:59 +01:00
Dominik Richter
af8e4e93ca add supports keyword to profiles 2015-12-31 17:54:13 +01:00
Dominik Richter
526932584d fix metadata validation 2015-12-28 13:35:38 +01:00
Dominik Richter
7473dea1f2 ignore auto-generated controls during verify check 2015-12-23 11:11:49 +01:00
Dominik Richter
b2e0fac625 change check errors on summary+title to warnings 2015-12-23 09:18:59 +01:00
Christoph Hartmann
ca33ac9288 Merge pull request #321 from jeremymv2/security_policy_fixes
Fixing issue with security policy always returning nil
2015-12-17 17:55:01 +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
Jeremy J. Miller
9210c97840 Cleaned up extra spaces in file 2015-12-16 21:46:27 -05:00
Jeremy J. Miller
0163d24b72 Adding security_policy integration test 2015-12-16 21:44:18 -05:00
Stephan Renatus
3a1dcb7669 teach cmp matcher octal tricks 2015-12-16 11:32:31 +01:00
troyready
29f954f7f3 add release to el pkg version & catch missing linebreaks
Package release info (e.g. '19.el7') is often required to determine if
a system has been properly patched.

Lines like the following from rpm are messing up the version returned
by the package resource:
"...\nVersion     : 1.8.6p3                           Vendor: Red Hat, Inc.\n..."
Correcting this with a new conditional check.
2015-12-11 13:05:22 -08:00
Christoph Hartmann
c461ffe7e7 add integration test for compare matcher 2015-12-11 17:03:12 +01:00
Stephan Renatus
652d51e9dc [resource/port] add port(addr, port) variant 2015-12-08 20:33:36 +01:00
Stephan Renatus
8532dd7034 [resource/port] change attribute names to plural, indicating arrays
see discussion in #256
2015-12-08 20:33:36 +01: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
7a1cd660c3 [resources/processes] add users, states attribute; update docs
processes('bash').user does not actually make much sense for a resource
that is a list -- different entries can belong to different users.
Analogous for processes('bash').state.

The attributes 'users' and 'states' expose the unique values
corresponding to that property of entries in the process list.

Fixes #295.
2015-12-08 13:06:27 +01:00
Christoph Hartmann
dcb09802d3 support string and symbol for os resource 2015-12-07 11:11:55 +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