Commit graph

3117 commits

Author SHA1 Message Date
Steven Danna
13ebea48e1 Allow port to be specified as a string
This allows the user to write:

   describe port(22) do
     it { should be_listening }
   end

as well as

   describe port('22') do
     it { should be_listening }
   end

without hitting an error.

Fixes #867

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-05 14:01:08 +02:00
Steven Danna
2ca3f4a464 Merge pull request #877 from chef/chris-rock/parseconfig-codestyle
improve code style for parse_config thanks @stevendanna
2016-08-05 12:24:13 +01:00
Christoph Hartmann
b3652bf85d improve code style for parse_config thanks @stevendanna
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2016-08-05 12:29:34 +02:00
Christoph Hartmann
61eb9cfbd6 Merge pull request #876 from chef/chris-rock/parseconfig-improvement
add params and content method to parse_config
2016-08-05 12:20:00 +02:00
Christoph Hartmann
d9a1a500d0 add params and content method to parse_config 2016-08-05 12:13:56 +02:00
Steven Danna
6d8d5561fc Merge pull request #869 from chef/chris-rock/update-integration-tests
Activate centos, debian and oracle linux in our travis tests
2016-08-05 10:11:36 +01:00
Christoph Hartmann
5d78324059 add fedora 23 & 24 to kitchen integration tests 2016-08-05 10:52:03 +02:00
Christoph Hartmann
93a068b8fa update kitchen container, activate all in travis 2016-08-05 10:52:03 +02:00
Christoph Hartmann
1c9d998afd do not run runit and upstart in docker since chef run fails 2016-08-05 10:52:03 +02:00
Christoph Hartmann
bb5fb617d5 harmonize cookbooks for integration tests, update docs, remove i386 in vagrant 2016-08-05 10:52:03 +02:00
Christoph Hartmann
03807be315 Merge pull request #873 from Anirudh-Gupta/master
remote target supported OS also includes hp-ux
2016-08-05 09:50:40 +02:00
Anirudh Gupta
f9e5b2a4ca remote target supported OS also includes hp-ux 2016-08-05 12:59:36 +05:30
Christoph Hartmann
a8ea1c31e3 Merge pull request #865 from chef/ssd/issue-855
Update inspec for os[:family] change in Train
2016-08-04 14:46:26 +02:00
Steven Danna
185787fa74
Set environment variables via Travis config
Using the `env` feature of the matrix builds is a little hack so that
one can quickly see what tests failed when looking at the build summary
page.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-04 13:32:35 +01: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
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