Commit graph

142 commits

Author SHA1 Message Date
James Stocks
23ed9bcf06
Merge pull request #5007 from inspec/cw/reporters-as-plugins
Reporters as Plugins
2020-05-22 16:10:29 +01:00
Nick Schwaderer
989d86c2ce Stores output of inspec json to archive and artifact
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-20 12:34:17 +01:00
Clinton Wolfe
36069943c4 Add ability to generate reporter plugins using inspec init
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-12 17:00:44 -04: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
Clinton Wolfe
a8b04769ca Ignore deprecation warning in fileutils and rubygems gems under ruby 2.7
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-04-08 10:56:55 -04:00
Thomas Heinen
61646ad3af Add support for alternate Gem sources for plugin installation/search
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2020-03-19 11:40:18 +01:00
Miah Johnson
8be265772b fixup_train_plugin_status should not activate gems.
This is handled by load_all already.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2020-02-10 14:52:12 -08:00
Ryan Davis
885e4f6c71 Fix test failure for call to vendor! w/o options.
Had to make options available for the mocking as well.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-03 17:12:51 -08: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
Josh Brand
3af3df34d7 remove inspec/jq from pkg_deps/pkg_build_deps
It's included as a dep in the scaffolding itself, and the multiple
dependencies cause failures when building (ty @smacfarlane <3)

`jq` is also no longer needed, it was an artifact of legacy testing

Signed-off-by: Josh Brand <jbrand@chef.io>
2019-12-03 18:04:51 -05:00
Clinton Wolfe
7807c3fa01 Re-namespace core Fetchers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-18 13:20:35 -05:00
Ryan Davis
a27eef1d0b Fixed env vars on functional plugin tests for windows.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:51:56 -08:00
Ryan Davis
ead386df14 Fixed inspec_init_plugin_test.rb
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:51:56 -08:00
Ryan Davis
a598356e12 Strip down plugin helper and change windows prefix execution.
Powershell doesn't use "&&" and we have it all over the tests.
Changing to ";".

Also starting to unify the plugin helper w/ the functional helper
since it has a LOT of duplication.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:51:56 -08:00
Ryan Davis
e60dc84188 Cleaned up inspec artifact testing.
Removed redundant test/functional/inspec_artifact_test.rb
Cleaned up lib/plugins/inspec-artifact/test/functional/inspec_artifact_test.rb
Made an error on windows (install-profile fails) raise instead of just print.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 14:50:39 -08: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
Ryan Davis
bb49d58cd9 Switched chefstyle back to Layout/AlignArguments=with_first_argument.
Fixed the flags mostly with `chefstyle -a` but also refactored/cleaned
some stuff by hand.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-08 12:57:43 -08:00
Miah Johnson
7442955ed6
Merge pull request #4650 from inspec/cw/fix-compliance-exec
Fix config reference in `compliance exec`
2019-10-31 14:18:47 -07: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
Ryan Davis
d201d1fbc2 Fixed the rest of the minitest deprecations by removing FuncTestRunResult.
Folded the json & other payloads into plain ivars on the test.
Found and removed some unused code while I was there.

Fixes #4533.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-22 12:15:28 -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
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
fc1ad67ffc More parallelization for functionals.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-17 11:50:31 -07:00
Ryan Davis
769d492108 Split up inspec-plugin_test.rb into a file per subcommand + helper.
This takes the run time from ~3 minutes to ~1 minute (in parallel).

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-16 17:19:32 -07:00
Clinton Wolfe
ac78ecd5ae Swap actual and expected in a test file
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
54f1011f7a Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
d7750054c8 Move sindows skip lines to be below test execution per rdavis
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
d1a42b8059 filter was introduced in ruby 2.6
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
f44c7bcdcd Convert the plugin name to a string only once when guessing at versions
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
1b7a8f3888 Make const in test file
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
8d80c89e56 Make install types and labels constant
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
f962ef2662 Simplify sort for list output
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
16fecbefb5 Return version number when listing plugins; correct UX coloration
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
e1031cc818 Correct newlines and duplicate output ins various UX messaging
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
cc758c7624 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
f0aa934ddc List tests pass again, adding filtering options
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
8cab0e862b Adopt the new UI style table, breaking most of the UI tests, which were already broken anyway
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:29:42 -04:00
Clinton Wolfe
68329aa8e5 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:28:52 -04:00
Clinton Wolfe
e581245391 Plausible implementation of detect_system_plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:28:52 -04:00
Clinton Wolfe
00b2d9480a Rename constant for user gem installs for clarity
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:28:52 -04:00
Clinton Wolfe
149663ba55 Updated messaging for user gem plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:28:52 -04:00
Clinton Wolfe
4211d3eb7c Failing functional tests for listing plugin gems
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-27 21:26:49 -04:00
Clinton Wolfe
2ef151dd56 Hrm, linting for upstream?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-19 13:52:28 -04:00
Clinton Wolfe
80d5788883
Apply new UI code to CLI and plugin-manager-cli (#4000)
Apply new UI code to CLI and plugin-manager-cli
2019-07-30 14:37:09 -04:00
Clinton Wolfe
b8c9043a3a
Permit plugin to be in path with git ref (#4251)
Permit plugin to be in path with git ref
2019-07-30 13:58:37 -04:00
Clinton Wolfe
88962af285 Update UX message testing
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:19:43 -04:00
Clinton Wolfe
918acb01c1 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-30 13:19:43 -04:00
Miah Johnson
b148bc85a2 Only some of the output is red
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-30 13:19:43 -04:00