Commit graph

2685 commits

Author SHA1 Message Date
Chef Expeditor
d0506d34fa
Bump version to 3.0.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 03:44:58 +00:00
Chef Expeditor
ff611a5c45
Bump version to 3.0.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 19:49:50 +00:00
Chef Expeditor
bd64a8e7c7
Bump version to 3.0.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 13:30:11 +00:00
Clinton Wolfe
ff2be7be56 FilterTable: allow Strings or Symbols as fields (#3481)
* Allow strings or symbols to be used interchangeably in filtertable criteria; improve error message
* rubocop
* Update test count

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-17 09:29:58 -04:00
Chef Expeditor
86c25c9624
Bump version to 3.0.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 13:14:31 +00:00
Jerry Aldrich
7313eb7819 style: Fix quotes/style on the docker resource (#3516)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-17 09:14:19 -04:00
Chef Expeditor
9300dae797
Bump version to 3.0.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 22:25:38 +00:00
Jared Quick
2bbcdbde9b
Inspec 3.0 (#3512)
* Remove deprecated yumrepo. (#3435)

* Remove deprecations for cli `--format` and metadata.rb (#3452)

* Remove deprecated database_helpers stderr/stdout methods.
Update deprecation text for processes/apache.

* Remove deprecations for `--format` and metadata.rb
Remove deprecated `format` code.
Remove deprecated code test and change json-config format test to use
reporter.
Remove deprecated metadata.rb code
Remove deprecation notice for old supports syntax.
Deprecate metadata.rb from source_reader
Remove rubocop disables as they are no longer required for this code block.
Remove deprecated legacy metadata.rb mock profiles.
Remove deprecated metadata.rb profile tests.
Remove deprecated yumrepo test.

* Allow inspec-3.0 branch to be tested.
* Allow appveyor to test inspec-3.0 branch
* Change runner tests to use reporter rather than format.
Remove deprecated `supports: linux` tests.

* Remove skip from inherited profiles from showing up in reporting (breaking change) (#3332)

* Skip loading dependency profiles if they are unsupported on the current
platform.

Skip loading dependencies if they are unsupported on the current
platform.

Wrap our log and next in a conditional checking if the platform is
supported.

Change a `if !` into a `unless`

Check if the backend is a Train Mock Connection and if so say that the
profile does support the platform.

While iterating through tests being loaded skip when the platform is
unsupported.

We now log a WARN when a profile is skipped due to unsupported platform,
so lets check that.

Modified existing test to log that there are 0 skipped tests, instead of
2.

Add functional test that loads profile-support-skip with a json reporter
to check that our controls are not loaded and that stderr contains our
warning.

* Rather than iterating through each test return before recursion if the platform is
unsupported.

* Resolve tests using a supported platform different from testing platform

Add a control to `test/unit/mock/profiles/complete-profile` that would
work on any OS with a Internet connection. This allows the profile
to execute on any OS with success. `filesystem_spec.rb` was a control
that would only work on Linux and some BSD's.

We want profile tests to consistently work across development and testing
platforms, and not get 'skipped' in some cases.  Travis-CI tests on Linux,
Inspec Dev team uses Linux and MacOS, Appveyor tests on Windows

Also Updated `file_provider_test.rb` for `complete-profile` content changes.

If you `MockLoader.load_profile` on a unsupported platform you might not
hit the usual skip. Lets handle situations where the tests array in
Profile#load_checks_params could be nil.

* Use safe navigation rather than checking if tests is nil.
Update tests to point to unsupported_inspec and account for WARN changes.
Make unsupported_inspec profile support os-family 'unsupported_inspec'

* Fix skip bug when using include/require controls. (#3487)

* Fix skip bug when using include/require controls.
* fix test and feedback.

* Remove need for UUID detection for Automate report (#3507)
* Add json metadata for skipped profiles (#3495)

* Add skip metadata to json reports
* Unify skip messages.
* Update with status field.
* Add testing.
* Fix tests.
* lint
* Add skip exit codes for profile skips.
* Update website for 3.0 launch

Add `plugins` to sidebar.
Change 2.0 -> 3.0 in slim files.
Update 3.0 features list.
* Fix comments
* Update float to numeric.
* Change Float to numeric.
* updated feature list and impact doc
* Change "What's new in InSpec 3.0" -> "Announcing InSpec 3.0"
* Bump VERSION to 3.0.0 (#3511)

* Remove 3.0 testing checks.

* Fix azure link.
2018-10-15 18:25:27 -04:00
Chef Expeditor
10f110b763
Bump version to 2.3.26 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 16:15:27 +00:00
Jared Quick
cccad057c2 Update the text on the generic default attribute (#3508)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-15 12:15:17 -04:00
Chef Expeditor
90d93c2ca1
Bump version to 2.3.25 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 16:09:59 +00:00
Jerry Aldrich
0b0a0a4d48 Change Inspec to InSpec where appropriate (#3494)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-15 12:09:46 -04:00
Chef Expeditor
23a5a8d864
Bump version to 2.3.24 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 19:44:56 +00:00
Jared Quick
00a54239d3
Fix plugin install issues in different ruby envs (#3505)
* Fix the install set for inspec plugins.
* Fix directory addition.
* Add comments.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-12 15:44:46 -04:00
Chef Expeditor
c2891ad278
Bump version to 2.3.23 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 03:25:11 +00:00
Jared Quick
f7551b3de3
Fix plugin issues on omni builds (#3499)
* Fix plugin issues on omni builds
* Fix gemspec to include etc dir.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 23:25:01 -04:00
Chef Expeditor
6a671324a1
Bump version to 2.3.22 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 01:14:41 +00:00
Chef Expeditor
8c9c1e0cc3
Bump version to 2.3.21 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 18:11:35 +00:00
Jared Quick
7c38080e6f
Backport compliance namespace and add testing for A2 audit report. (#3493)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 14:07:37 -04:00
Chef Expeditor
7f0618a37c
Bump version to 2.3.20 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 18:06:08 +00:00
Clinton Wolfe
de5403d352 Plugins: Filter Plugins During Search and Install (#3458)
* Unit and functional tests for a reject list facility
* Implementation of plugin reject facility
* Initial draft of reject list
* Add option to search to hide test fixture by default
* Fix test
* PR feedback

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-11 14:05:57 -04:00
Chef Expeditor
c740d567b7
Bump version to 2.3.19 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 13:42:15 +00:00
Jared Quick
ba37ca1875
Fix error on empty attributes yaml (#3485)
* Allow empty attributes param.
* Add warning if invalid attributes.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 09:41:36 -04:00
Chef Expeditor
3780298111
Bump version to 2.3.18 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 20:17:17 +00:00
Chef Expeditor
1ae95a1a95
Bump version to 2.3.17 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 17:27:19 +00:00
Chef Expeditor
89492f1a22
Bump version to 2.3.16 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 13:20:44 +00:00
Aaron Lippold
933387e739 Fixes #3480 (#3483)
* updates the AlpinePkg class `info` method to use the `delete_if` method as the `reject!` method was returning nil.

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2018-10-10 09:20:33 -04:00
Chef Expeditor
74f82ed477
Bump version to 2.3.15 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 12:21:59 +00:00
Chef Expeditor
8bffeeece8
Bump version to 2.3.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 12:17:27 +00:00
Chef Expeditor
d6b1f3c32a
Bump version to 2.3.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-08 13:38:30 +00:00
Chef Expeditor
df3f909705
Bump version to 2.3.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-08 13:34:14 +00:00
Chef Expeditor
5acf586831
Bump version to 2.3.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-05 20:24:38 +00:00
Jared Quick
cbb3b600d9
Fix archive with required attributes (#3468)
* Skip require check unless we are in a exec call.
* Add testing
* Update comment.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-05 16:24:26 -04:00
Chef Expeditor
31d4699fc4
Bump version to 2.3.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 18:31:51 +00:00
Jared Quick
cb12ada2fe
Move compliance to v2 plugin (#3423)
* Move compliance pluging to v2 system.
* Update kitchen-inspec to test.
* Add legacy require patsh.
* Fix unit test

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-04 14:31:39 -04:00
Chef Expeditor
92249898d9
Bump version to 2.3.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 18:06:30 +00:00
Jonathan Hartman
7451917223 Support finding larger processes on Busybox (#3446)
For larger processes, Busybox's ps displays the vsz and rss columns in
megabytes or gigabytes, with no option I've found to override the behavior.

This change updates the process regex to account for that and converts
the values to kilobytes so they can still be cast as integers.

Signed-off-by: Jonathan Hartman <j@hartman.io>
2018-10-04 14:06:17 -04:00
Chef Expeditor
3248af1fe3
Bump version to 2.3.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 13:04:03 +00:00
Will Fisher
f23bfc05ce Fix distinct_exit cli desc to reflect reality (#3463)
The description for `distinct_exit` had the exit codes backwards.

From the long desc
> If some tests skipped but none failed, exit code 101 is returned. If at least one test failed, exit code 100 is returned.

Signed-off-by: Will Fisher <wfisher@chef.io>
2018-10-04 09:03:54 -04:00
Chef Expeditor
3de23f65af
Bump version to 2.3.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-03 05:57:37 +00:00
Jerry Aldrich
d5bb1e5fe9 Fix attribute with empty hash regression (#3454)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-02 22:57:25 -07:00
Chef Expeditor
f3b835b43d
Bump version to 2.3.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-02 19:28:01 +00:00
Jerry Aldrich
6381dd1b1d Modify cmp matcher output to use .inspect (#3450)
This modifies the output of failed test when using the `cmp` matcher by
calling `.inspect` on the actual value passed.

This makes it easier to diagnose failed matches due to characters such
as `\n` not being visible.

Current behavior:
```
inspec> describe command('echo demo') do
inspec>   its('stdout') { should cmp 'demo' }
inspec> end

Profile: inspec-shell
Version: (not specified)

  Command: `echo demo`
     ×  stdout should cmp == "demo"

     expected: "demo"
          got: demo

     (compared using `cmp` matcher)

Test Summary: 0 successful, 1 failure, 0 skipped
```

New behavior:
```
inspec> describe command('echo demo') do
inspec>   its('stdout') { should cmp 'demo' }
inspec> end

Profile: inspec-shell
Version: (not specified)

  Command: `echo demo`
     ×  stdout should cmp == "demo"

     expected: "demo"
          got: "demo\n"

     (compared using `cmp` matcher)

Test Summary: 0 successful, 1 failure, 0 skipped
```

Many thanks to @jazaval for discovering this!

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-02 15:27:48 -04:00
Clinton Wolfe
a0d8f305c1 Revert "Only show test-fixture gem s in search if a speacial flag is passed."
This reverts commit 66e3b578af.
2018-10-01 15:12:54 -04:00
Clinton Wolfe
66e3b578af Only show test-fixture gem s in search if a speacial flag is passed.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-01 15:11:55 -04:00
Chef Expeditor
ccb50da4b6
Bump version to 2.3.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-28 21:53:02 +00:00
Jared Quick
2490a72c39 Fix plugin gem install code when deps cannot be resolved (#3453)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-28 17:52:51 -04:00
Chef Expeditor
2b42e32a57
Bump version to 2.3.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 22:46:46 +00:00
Clinton Wolfe
857b9bb11c Plugins: Support for Train Plugins in InSpec (#3444)
* Unit tests passing for loading Train plugins
* detect works with a train test fixture
* Update fixture install of train-fixture-plugin
* Add functional tests for detect and shell when talking to a train plugin backend
* Update docs to reflect availability of Train plugins
* Functional test for install train plugin from path
* Working install train plugin from path, more tests for installing from odd locations
* PR Feedback

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-27 18:46:35 -04:00
Chef Expeditor
5693d16f7e
Bump version to 2.3.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 20:57:27 +00:00