Commit graph

42 commits

Author SHA1 Message Date
Nikita Mathur
0fbc556cd6 Buildkite fixes
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-03 13:56:33 +05:30
Nikita Mathur
d11e5dd1af Automate version command fix
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2022-03-02 17:04:23 +05:30
Clinton Wolfe
e198120cf7
Merge pull request #5534 from inspec/nm/compliance-remove-support
Removed support for compliance and a1 server from InSpec compliance
2021-05-31 18:38:13 -04:00
Nikita Mathur
6ce9c04232 Check added for automate server 2 for server presence
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-25 17:47:48 +05:30
Nikita Mathur
dcb99872ff Removed support for compliance and a1 server from inspec compliance
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-20 17:12:22 +05:30
Nikita Mathur
3e06280f01 Replaced api doc from compliance help command with the relevant doc link
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-19 18:00:42 +05:30
Nikita Mathur
3fd2c57a5a Added new automate doc link for login tokens
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-17 14:30:49 +05:30
Nikita Mathur
a23dd75ae7 Better test name for automate login invalid token
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-10 13:04:34 +05:30
Nikita Mathur
ca4cc26319 Automate login to validate token before storing configurations
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-10 13:04:34 +05:30
Nikita Mathur
39680e7926 Chef automate product name changes in messages
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-05 17:57:31 +05:30
Nikita Mathur
6d140b89b6 Review changes related to inspec compliance to be treated as backward compatible alias
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-04 19:04:54 +05:30
Nikita Mathur
072a8c438f Presenting automate command as alias in both the content and dev docs
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-03 13:45:56 +05:30
Nikita Mathur
a4d822ae43 Inspec automate command extended for compliances
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-30 17:20:03 +05:30
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
Pete Higgins
edf4a9838a Fix link to documentation image.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
2020-12-07 17:18:03 -08:00
Tim Smith
303f530850 Update to Chefstyle 1.2.1
Update a few cop names
Remove redundant returns

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-12 13:12:26 -07:00
John Snow
8d676f6ed2 Fix typo's after review
Signed-off-by: John Snow <thelunaticscripter@outlook.com>
2020-04-20 09:50:58 -04:00
John Snow
03c012e3c9 Add additional debug logging for automate login
Signed-off-by: John Snow <thelunaticscripter@outlook.com>
2020-04-17 15:50:40 -04:00
Ryan Davis
c57a0e1f13 Found and fixed more mocha/setup deprecations.
This level of duplication is not good.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:46:47 -08:00
Ryan Davis
7d95ece60d Remove circular require between fetcher and compliance plugin w/ autoloads.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-24 04:10:48 -08:00
Clinton Wolfe
7807c3fa01 Re-namespace core Fetchers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-18 13:20:35 -05:00
Clinton Wolfe
954174c921 Fix config reference in compliance exec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-30 15:56:07 -04: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
07dc5e3192 First pass at cleaning deprecations for old minitest/spec-style tests.
3 files left to go, and they're behaving oddly so I'm leaving them out
in this pass. Looks like 21 deprecations left.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-03 13:45:19 -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
Miah Johnson
a4f4fe5231 chefstyle -a; https://github.com/chef/chefstyle/pull/74
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-08 17:22:50 -07: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
Ryan Davis
be125598c8 Additional whitespace cleanup.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 17:58:02 -07:00
Artem Sidorenko
eee2199960 Dist branding for plugins/inspec-compliance
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:56 +02:00
Ryan Davis
22a3ee5855 Fixed missing requires.
Telemetry tests were hitting inspec/config via a different route and
inspec/config uses forwardable w/o requiring.

lib/plugins/inspec-compliance/test/unit/api_test.rb had a test that
had never run before and required webmock.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 21:02:13 -07:00
Ryan Davis
9b7c292d4c Use IO globals instead of IO constants.
Helps testing and lots of other things if we only use $stdout/$stderr.

STDOUT/STDERR should only be used to restore the globals.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 12:48:18 -07:00
Ryan Davis
8ec76e666e Fixed assignment to RUBY_VERSION.
Lost in a sea of deprecation warnings.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
6235c3f658 Fixed missing requires
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -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
skylerto
51cda478d2 Fix issues with inspec compliance upload
Issues with underlying API changes caused a break in the current `inspec compliance upload`

This diff shows the change in API:

3cc2ee63e0...85c815011a (diff-9d107f8e84fe350fa821fed1838dbda8L162)

Implementing the same change in the `inspec-compliance` plugin fixes the
following issue:

```
Traceback (most recent call last):
        11: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/inspec-3.6.12/bin/inspec:12:in `<main>'
        10: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
         9: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
         8: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
         7: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
         6: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
         5: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
         4: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
         3: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
         2: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
         1: from /hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/inspec-3.6.12/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb:144:in `upload'
/hab/pkgs/chef/inspec/3.6.12/20190221172437/lib/gems/inspec-3.6.12/lib/inspec/backend.rb:45:in `create': undefined method `unpack_train_credentials' for {:target=>"mock://"}:Hash (NoMethodError)
```

Signed-off-by: skylerto <skylerclayne@gmail.com>
2019-02-25 10:24:27 -05:00
Jerry Aldrich
701dd9fb0b Change usage of Dir.home to Inspec.config_dir (#3567)
This prevents errors on systems without `ENV['HOME']` (e.g. Habitat
services) by allowing the specification of the location of `.inspec` via
`ENV['INSPEC_CONFIG_DIR']`.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-11-01 16:32:45 -04: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
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