Commit graph

2380 commits

Author SHA1 Message Date
Dominik Richter
16bd6a14d5 revert control_summary field in output
(1) The field is not yet optimal, the calculations are great!
(2) Changing this field should go together with all other breaking json changes, especially if https://github.com/chef/inspec/pull/811 results in a change.
2016-08-08 11:54:27 +02:00
Steven Danna
0e3b661200 Merge pull request #883 from chef/ssd/a-test-too-far
Remove some platforms from travis config
2016-08-05 18:48:04 +01:00
Kartik Null Cating-Subramanian
470b7bb7d2 Merge pull request #860 from chef/vj/inspec-controls-count
Count controls in the summary output. Fix #852
2016-08-05 13:47:45 -04:00
Kartik Null Cating-Subramanian
8094add5b3 Test summary JSON schema 2016-08-05 13:27:30 -04:00
Steven Danna
b979579e5f
Remove some platforms from travis config
We can run these platforms before the release, but running them on every
commit means we wait a long time for travis builders.
2016-08-05 18:16:55 +01:00
Steven Danna
9baf01cfb0 Merge pull request #882 from chef/ssd/autofail
Explicitly require docker transport to avoid autoload bug
2016-08-05 18:16:28 +01:00
Steven Danna
dea19846a3
Explicitly require docker transport to avoid autoload bug
Ruby's autoload feature is not threadsafe.  We are hoping requiring the
docker plugin early will fix odd failures we have been seeing.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-05 17:58:20 +01:00
Victoria Jeffrey
6c91183995 count controls in the summary output. Fix #852 2016-08-05 11:43:29 -04:00
Kartik Null Cating-Subramanian
31a7d58473 Merge pull request #879 from chef/ksubrama/json_fix
Generate test labels for multi-test controls
2016-08-05 10:11:15 -04:00
Kartik Null Cating-Subramanian
0f572df4be Fix integration test 2016-08-05 10:01:29 -04:00
Kartik Null Cating-Subramanian
c5556e65f8 Cleanup to fix some formatting. Fix #872 2016-08-05 09:41:47 -04:00
Kartik Null Cating-Subramanian
742037c29d Generate test labels for multi-test controls: Fix #812 2016-08-05 09:41:47 -04:00
Steven Danna
84d8e2d987 Merge pull request #878 from chef/ssd/issue-867
Allow port to be specified as a string
2016-08-05 13:39:46 +01:00
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