Commit graph

2352 commits

Author SHA1 Message Date
Christoph Hartmann
b16ea5f89f Merge pull request #864 from chef/ssd/noisy-todo
Be a bit louder when skipping an entire integration suite
2016-08-04 14:21:35 +02:00
Steven Danna
f76bc6b7b4
Be a bit louder when skipping an entire integration suite 2016-08-03 16:41:27 +01:00
Christoph Hartmann
e6f73ff373 Merge pull request #863 from chef/ssd/issue-749
Use systemctl's helper command to determine enabled & active status
2016-08-03 15:22:29 +02:00
Steven Danna
28946f5fde
Use systemctl's helper command to determine enabled & active status
The output of `systemctl show SERVICENAME` can be misleading in the
case of non-native services (i.e. services configured via an init script
and integrated with systemd via a shim) or for more sophisticated unit
types.

For example, the UnitFileState of ntp is "bad":

    > systemctl show ntp | grep UnitFileState
    UnitFileState=bad

despite systemd reporting it as enabled:

   > systemctl is-enabled ntp
   ntp.service is not a native service, redirecting to
   systemd-sysv-install
   Executing /lib/systemd/systemd-sysv-install is-enabled ntp
   enabled

Further, the old parsing code would have missed unit files in the
following states that are technically enabled:

   enabled-runtime, indirect, generated, and transient

Using the `is-enabled` commands ensures that we report the same enabled
status that systemd reports, without having to update our own parsing in
the event that new unit states are added. Additionally, as shown above,
it handles the sysv compatibility helper.

Similarly, the is-active helper command ensures that we always report
the same active/not-active status as systemd would natively. For
instance, a quick reading of `src/systemctl/systemctl.c` in the systemd
source shows that systemctl reports units as active if they are in the
state `UNIT_ACTIVE` or `UNIT_RELOADING`.

Fixes #749

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-03 13:31:09 +01:00
Christoph Hartmann
bd3a7ee7df 0.28.1 2016-08-03 12:56:36 +02:00
Christoph Hartmann
8b196bd08d Merge pull request #859 from chef/vj/add-supported-os-to-readme
Add supported OS list to readme
2016-08-02 19:53:59 +02:00
Victoria Jeffrey
987a0d5b35 Add supported OS list to readme 2016-08-02 11:57:03 -04:00
Christoph Hartmann
707182d656 Merge pull request #850 from chef/ssd/core-not-kcore
Support either /dev/kcore or /dev/core in the tests
2016-08-02 14:23:06 +02:00
Steven Danna
f30902211c Use either /dev/kcore or /dev/core in tests
In many linux distributions a link to /proc/kcore is placed at
`/dev/core`. In TravisCI we see it at `/dev/kcore`. To avoid tests
failing for some developers locally, we support either location.
2016-08-02 14:14:49 +02:00
Christoph Hartmann
433b72456e Merge pull request #857 from chef/ssd/readme-update-int-tests
Update README with correct directions for integration tests
2016-08-02 14:10:37 +02:00
Steven Danna
eba0344de1 Update README with correct directions for integration tests 2016-08-02 13:59:06 +02:00
Christoph Hartmann
f1112f318e Merge pull request #856 from chef/ssd/travis-no-push
Only test PRs and pushes to master
2016-08-02 13:57:31 +02:00
Steven Danna
72333a08ec
Only test PRs and pushes to master
Without this, Travis often ends up running 2 CI jobs for updates to a
PR: 1 for the update to the PR, 1 for the push to the branch.

By adding this bit of config, travis will still run a job for any update
to a PR, but won't run a duplicate job for the push to the branch that
the PR is based off of. We use this in chef/chef and chef/chef-server
to reduce unnecessary use of TravisCI resource.
2016-08-02 11:55:06 +01:00
Dominik Richter
df35d92360 Merge pull request #841 from chef/chris-rock-patch-1
add air gap environment post from @jeremymv2
2016-07-27 14:09:35 +02:00
Christoph Hartmann
88d2e57444 Merge pull request #832 from chef/dr/basecli
move base_cli to lib/inspec
2016-07-27 12:53:45 +02: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
Christoph Hartmann
aa70b7cd16 add air gap environment post from @jeremymv2 2016-07-25 10:16:32 +02:00
Alex Pop
835457091a Merge pull request #838 from chef/dr/fix-color-barriers
fix color code barriers
2016-07-22 11:47:45 +01:00
Dominik Richter
69f9c0ff59 fix color code barriers 2016-07-22 12:41:00 +02:00
Dominik Richter
3059a18c56 0.28.0 2016-07-21 15:27:41 +02:00
Dominik Richter
402a90db83 Merge pull request #837 from chef/dr/port-win2008
add port resource for windows 2008
2016-07-21 15:06:53 +02:00
Dominik Richter
c2f34932ad add port resource for windows 2008
using `netstat -an`
2016-07-21 14:58:43 +02:00
Dominik Richter
36a271adff Merge pull request #835 from chrisevett/master
add mssql resource
2016-07-20 07:48:50 -05:00
Dominik Richter
13cc5f5d1f Merge pull request #836 from anniehedgpeth/new-blog-posts
Added two InSpec Tutorial blog posts
2016-07-20 07:47:06 -05:00
Annie Hedgpeth
03f4b4d97c Added two InSpec Tutorial blog posts 2016-07-18 20:06:44 -05:00
Chris Evett
925da00b3d fixing rubocop error 2016-07-17 14:22:04 -04:00
Chris Evett
85988aab9c add mssql resource 2016-07-17 14:18:25 -04:00
Christoph Hartmann
d9b6277aa5 Merge pull request #831 from chef/dr/circular-loading
prevent circular loading of resource library
2016-07-16 03:38:43 -05:00
Dominik Richter
255d8fcd68 prevent circular loading of resource library 2016-07-16 05:15:23 +02:00
Dominik Richter
b9a2ec9b40 0.27.1 2016-07-15 16:27:14 +02:00
Christoph Hartmann
54c5edfc23 Merge pull request #830 from atomic111/master
FIX: file(hba_config_file) test in documentation
2016-07-14 11:06:15 -05:00
Patrick Münch
216a6aeac1 FIX: file(hba_config_file) test in documentation, it is not working and rubocop detect some issues
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
2016-07-14 13:06:41 +02:00
Dominik Richter
174bbe89fb Merge pull request #828 from chef/ap/sym_vs_strings
Fix runner.rb key inconsistency
2016-07-13 19:40:17 -05:00
Alex Pop
ba4b9c26c5 fix symbols and strings inconsistency 2016-07-13 11:53:04 +01:00
Dominik Richter
89aa647816 Merge pull request #824 from atomic111/master
FIX #823 wrong postgres path detection for conf_dir and conf_path
2016-07-12 23:14:20 +02:00
Patrick Münch
7d986c2d17 FIX #823 wrong postgres path detection
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
2016-07-12 19:59:08 +02:00
Christoph Hartmann
c94751fcf9 0.27.0 2016-07-10 21:16:15 -05:00
Christoph Hartmann
826a8bdee0 Merge pull request #819 from chef/dr/suid-sgid-sticky
add suid sgid and sticky support for file resource
2016-07-10 21:03:34 -05:00
Dominik Richter
68cf88f701 add suid sgid and sticky support for file resource 2016-07-10 23:08:42 +02:00
Christoph Hartmann
0a42d75a73 Merge pull request #815 from atomic111/master
small fix for postgres_session documentation (Test for risky database entries example)
2016-07-06 16:21:09 +02:00
Patrick Münch
19c449b158 change the Test for risky database entries example
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
2016-07-06 16:07:32 +02:00
Christoph Hartmann
34de6d55a1 Merge pull request #814 from chef/dr/systemd-active
check service running by ActiveState
2016-07-06 14:45:34 +02:00
Dominik Richter
c6644ebdfe check service running by ActiveState
See http://unix.stackexchange.com/questions/159174/differences-between-inactive-vs-disabled-and-active-vs-enabled-services
2016-07-06 12:57:04 +02:00
Christoph Hartmann
495225f93d Merge pull request #816 from chef/dr/ffi
pin gem version for ffi due to appveyor failures
2016-07-06 12:55:09 +02:00
Dominik Richter
fde8454a2b pin gem version for ffi due to appveyor failures
See https://ci.appveyor.com/project/chef/inspec/build/1.0.889/job/19sdqmtmie1wgece
2016-07-06 02:43:43 +02:00
Dominik Richter
70f248e39b Merge pull request #716 from chef/chris-rock/bundles
Update documentation for bundles
2016-06-29 08:21:22 +02:00
Christoph Hartmann
8a17cb6b5b update readme for bundles 2016-06-29 08:14:36 +02:00
Dominik Richter
4c8abea724 Merge pull request #808 from chef/dr/source-location
api: report source location with field identifiers
2016-06-28 13:40:12 +02:00
Dominik Richter
5da73db6a3 api: report source location with field identifiers
Mixing types in an array without specifying what these fields point to is not just confusing, but also causes issues with endpoints that may consume this data and dont process mixed types. We strive to have a stable api for 1.0 and this is a sin that was left after the major overhaul. Time to fix it.
2016-06-28 12:03:20 +02:00
Christoph Hartmann
b288df1514 Merge pull request #803 from bigbam505/bm-add-documentation
Add array documentation to yaml / json resource
2016-06-27 10:30:08 +02:00