Commit graph

86 commits

Author SHA1 Message Date
Takuya N
fdb789febf
Sync up the default branch as main (#6239)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-08-25 09:33:17 -04:00
Clinton Wolfe
cabbdf2adb With .rubocop.yml temporarily disabled, autocorrect example profile control code with cookstyle
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-11-23 22:44:41 -05:00
Tim Smith
31427728e8 Apply cookstyle to the example profile
Let's make sure people start off on the right foot.

Signed-off-by: Tim Smith <tsmith@chef.io>
2021-09-28 15:22:26 -07:00
Clinton Wolfe
cdfb325ca3 Apply chefstyle -a, and manually remove duplicate requires
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 13:25:04 -05:00
IanMadd
6a592a6db2 Update various readmes and docs
Signed-off-by: IanMadd <imaddaus@chef.io>
2020-09-14 14:09:23 -07:00
Clinton Wolfe
4a3c192749 Update rake deps for security issue
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-03-02 19:50:18 -05:00
Ryan Davis
b1c2af209b Corresponding fixes for the move from test/unit/mock to test/fixtures.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-08 19:20:12 -08:00
Miah Johnson
9e1a380f0a Delete extra newline
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 10:13:24 -07:00
Miah Johnson
a40ec993e8 Rename files to remove references to gordon
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 10:13:24 -07:00
Miah Johnson
df7efefc9d mostly a search and replace for gordon -> example
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 10:13:24 -07:00
Ryan Davis
18ce4850f0 Initial pass to clean up functional testing wrt exit codes and output.
This should get windows tests running again? Hopefully? They're
running SO slowly on my vagrant box that I'm just pushing for now.
They're clean on the mac side.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -07:00
Clinton Wolfe
46624396c7 Bulk edit of test files to use input() in DSL
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-06-12 12:17:19 -04:00
Miah Johnson
e46018a517 chefstyle -a cleanup
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-11 18:52:38 -07:00
Ryan Davis
a5309ea392 blindly applied chefstyle -a
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 18:52:03 -07:00
Miah Johnson
2a1b1d8e88 Remove all leading newlines.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-31 11:43:44 -07:00
Miah Johnson
6c19e81a06 Remove authors tags from source files.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-28 12:47:39 -07:00
Ryan Davis
eead889325 Fix test framework contention.
RSpec is used internally. Minitest is used for our tests. They don't
really like each other. This fixes that and gets our tests
consistently running the correct number of tests (they were load-order
dependent before and each platform had its own different number of
tests it would run).

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-15 00:33:53 -07:00
Ryan Davis
6adf1d2560 Remove all byebug requires in code.
Please don't leave debugging remnants in the code.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:24:14 -07:00
Miah Johnson
f7575cca00 Remove more magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-09 13:24:25 -07:00
Miah Johnson
11b8da3283
Merge branch 'master' into mj/encoding 2019-05-08 12:59:55 -07:00
Miah Johnson
659b4b373a Remove # encoding: utf8 magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00
Ryan Davis
476c6878b3 Modernize use of Minitest.
+ Turn off verbosity in Rakefile by default. Use `rake V=1` to turn back on.
+ MiniTest -> Minitest everywhere.
+ MiniTest::Unit::TestCase -> Minitest::Test everywhere.
+ Updated minitest doco urls to official and up-to-date site.
+ Normalize requires. Only needs "minitest/autorun" and "minitest/pride".

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-03 15:01:57 -07:00
Tim Smith
097e2deedc Don't include the apt recipe over and over again in the recipes
We run apt_update once with chef and we already update the cache directly on the container at start. We don't need to try to do the same thing 3 other times.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 17:19:55 -08:00
Clinton Wolfe
8760c48dbd Update docs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-28 00:42:27 -05: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
Clinton Wolfe
da0ae7bac9 Plugins: Example CLI Plugin, a Resource Lister (#3421)
* Plugin example, CLI resource lister
* Move example plugin into a directory to look like a regular project
* Skeleton of testing for example plugin
* Example plugin unit tests work
* Functional tests added, using core helper
* Add a global method to determine InSpec install root
* Add linter support to the example
* Adjust inspec project rubocop to run linter on example plugins
* Linter autocorrections
* Update readme

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-27 16:57:18 -04:00
Jerry Aldrich
20776b363d Add support for multiple descriptions for controls (#3424)
* Add support for multiple descriptions for controls

This adds the ability to specify multiple descriptions in controls.

Example:

```ruby
control 'my-control' do
  impact 1.0
  title 'My control'
  desc 'A default description'
  desc 'rational', 'I need an example'
  describe file('/tmp') do
    it { should be_directory }
  end
end
```

Many thanks to @jquick for helping me with the unit tests.
* Remove unused `descriptions` method
* Remove unused profile from test mocks
* Respond to feedback

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-26 13:28:57 -04:00
Jared Quick
1c12a544c7
Add string impact options for controls (#3359)
* Add impact class which contains all cvss scores.
* Add testing for impact changes.
* Change symbols to strings for impact.
* Update error messages to be more clear.
* Fix test with new sha

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 14:14:05 -04:00
Jared Quick
6445e2c6d5
Add windows functional tests (#3385)
* Add windows functional tests.
* Fix tests for 2012 server.
* Fix windows build script
* Add more functional tests for windows.
* Update comment with TODO.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 18:04:16 -04:00
Jared Quick
06e1aa5379 Allow custom resources to access all other resources (#3108)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-06 11:56:51 -04:00
Shaun Mouton
d56a601a4d updating kitchen-puppet example for puppet 15 (#2972)
Signed-off-by: Shaun Mouton <smouton@chef.io>
2018-04-19 12:55:10 -04:00
Jerry Aldrich
4731d95abd docs: Update example resource (#2904)
* Change `skip_resource` to use raise
* Add `supports` lines to example resource
* Change to rescue `StandardError` vs `Exception`
* Change raise to use `e.message` vs `$!`
* Remove redundant returns
* Change `File.exists?` to `File.exist?`
* Update shasum in tests

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-04-05 08:50:49 -04:00
Jan Collijs
87f1f500de Fix: pointed concurrent-ruby to version 1.0 to fix dependencies (#2879)
Signed-off-by: Jan Collijs <github@visibilityspots.org>
2018-03-26 14:28:11 -04:00
eramoto
a687479e6c Fix typo in some docs (#2841)
Also includes fixes such as PostgreSQL, TCPMUX, and etc.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2018-03-20 08:43:30 -04:00
Jerry Aldrich
9616ebf19a Add example profiles for AWS/Azure (#2680)
* Add example AWS profile

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add example Azure profile

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-02-18 12:12:44 +01:00
Adam Leff
d77551baf1 Remove rubocop from example Gemfiles (#2341)
The pinned version of Rubocop in some of the TK examples' Gemfiles
was a very old version with known vulnerabilities. Since these are just
examples and have no Rake tasks that rely on them, I removed rubocop
outright from the example Gemfiles.

Signed-off-by: Adam Leff <adam@leff.co>
2017-11-27 19:05:52 +01:00
Kevin Formsma
94c2e8181c Add sensitive flag to resources to restrict logging output (#2017)
* Filter check output based on sensitive flag
-Updated check in formatters to filter check output during failures based on
sensitive metadata flag
-Added functional test of output filtering
-Updated documentation with blerb on usage
* Update output format for sensitive resources

Signed-off-by: Kevin Formsma <kevin.formsma@gmail.com>

* Update color output on new test

Update the color output to match the newly-expected non-color format if there are no tests that match.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-25 16:21:49 -04:00
Kimberly Garmoe
88ee548551 Fixes typo. (#2047)
Signed-off-by: kgarmoe <kgarmoe@chef.io>
2017-08-17 15:13:44 -04:00
Adam Leff
a6582bea9b Remove any "All Rights Reserved" references (#1969)
* Remove any "All Rights Reserved" references

InSpec is licensed and released under the Apache 2.0 license. This
change removes all reference to legacy code files that still had
any Copyright or License lines referring to "All Rights Reserved".

Signed-off-by: Adam Leff <adam@leff.co>

* fix functional tests

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-06-28 04:14:19 -07:00
Christoph Hartmann
a6ef98c896 verifies that inspec.yml uses licenses in SPDX format
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-31 00:21:05 -05:00
Dominik Richter
bac360475f bugfix: dev-sec/ssl-benchmark -> ssl-baseline
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-09 10:58:07 +02:00
Adam Leff
a1769cc01b
Update inspec.io references in docs/code
The website is now at https://www.inspec.io - updating all inspec.io
references accordingly. :)

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-27 18:05:51 -04:00
Christoph Hartmann
c2d92d8e86 use new devsec baseline
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-01-25 20:22:38 +01:00
Christoph Hartmann
8808c57cae Extend functional tests for vending based on feedback from @alexpop
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2016-11-29 23:40:42 +01:00
Christoph Hartmann
fef4f9447b add functional tests
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2016-11-09 11:49:51 -06:00
Christoph Hartmann
1ff690b0cc update example, how to pass attributes for dependencies 2016-11-04 15:35:08 +01:00
Sean Walberg
d4c887704a Fix broken link in README.md
Link pointed to the right doc but the wrong extension.

Obvious fix.

Signed-off-by: Sean Walberg <sean@ertw.com>
2016-10-20 12:42:15 -04:00
Christoph Hartmann
9eeb5ba8a7 Remove pre-1.0 warning from meta-profile 2016-10-02 18:06:07 +02:00
Steven Danna
8f10ee53c5 Provide inspec.yml shortcut syntax
- Allow users to elide the `name` attributes
- Assume a default source of supermarket

Fixes #1048

Signed-off-by: Steven Danna <steve@chef.io>
2016-09-14 08:46:06 +02:00
Christoph Hartmann
a8a3053a48 rename example to meta-profile 2016-09-12 14:45:40 +02:00