Commit graph

301 commits

Author SHA1 Message Date
Vasu1105
99a170d7e5 Updated inspec-aws git url to replace branch to master to main
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-30 18:08:06 +05:30
Thomas Heinen
096e5cd655
Fix tests
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2021-08-23 15:01:17 +02:00
Thomas Heinen
72204bd0fc
Proposed implementation for installation warnings 2021-08-23 14:12:33 +02:00
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
Clinton Wolfe
e841b576ad
Merge pull request #5536 from inspec/vasundhara/update-inspec-init-plugin
Update inspec init plugin
2021-05-31 18:06:39 -04:00
Vasu1105
849536a63a Minor updates rename activator to activators in some places
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-26 06:21:50 +05:30
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
Vasu1105
0d1c82dae2 Dev docs for inspec init plugin
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-25 09:55:54 +05:30
Vasu1105
6a45164e87 Updated to use Inspec.deprecate instead of log to deprecate the --hook option
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-24 18:05:18 +05:30
Vasu1105
a3feab0943 Handles string for for descripiton parsing
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-24 16:50:37 +05:30
Vasu1105
cb573e6050 Fix typo
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-24 15:45:35 +05:30
Vasu1105
14906ec1cd Update inspec init plugin to deprecate --hook option and replace it with --activators. Make alias for backword compatibility
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-24 15:43:33 +05:30
Vasu1105
ee6fd1b158 Fix multiline descripition issue of not parsing the data correctly
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-24 14:53:48 +05:30
Vasu1105
39303635e9 Fix failing test
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-21 18:51:08 +05:30
Vasu1105
bc15deab93 Update inspec init plugin:
1. To use double quotes as per chefstyle
2. Template files renamed to .erb

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-21 18:04:26 +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
Collin McNeese
fa327ab55c
updates readme for profile inits to reference inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 11:28:20 -05:00
Collin McNeese
9da7a7338d
updates aws profile init to use inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 09:19:11 -05:00
Collin McNeese
2f4dc632a1
Updates GCP profile init to use inputs instead of attributes
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 09:15:10 -05: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
Pete Higgins
edf4a9838a Fix link to documentation image.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
2020-12-07 17:18:03 -08:00
James Stocks
cbad55aec9
Tweak JUnit plugin docs
Signed-off-by: James Stocks <jstocks@chef.io>

Co-authored-by: mjingle <mjinglewski@chef.io>
2020-09-22 15:46:20 +01:00
James Stocks
48054ef2d1 Update documentation for junit plugins
Signed-off-by: James Stocks <jstocks@chef.io>
2020-09-22 14:15:01 +01:00
Clinton Wolfe
b3f72f5854 Implement a corrected junit2 reporter that can be validated
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00
IanMadd
6a592a6db2 Update various readmes and docs
Signed-off-by: IanMadd <imaddaus@chef.io>
2020-09-14 14:09:23 -07:00
Nick Schwaderer
1a1205c729 Fixes many of the old skip_windows instances
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-09-14 15:55:10 +01: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
Nick Schwaderer
cc521b5400
Merge pull request #5084 from inspec/cw/reporter-plugin-junit
Convert JUnit Reporter to a Plugin
2020-08-07 18:06:43 +01:00
James Stocks
cd077a1247 Improve profile status rendering in html2 reporter
Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-09 14:02:42 +01:00
James Stocks
fd4c501c70 Change profile skip_message to status_message
Keep a duplicate of the message in skip_message for the JSON reporters, for backwards compaibility.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-03 15:53:09 +01:00
James Stocks
d94d56c4b9 Ignore intermittent test teardown error
Occasionally when the `isolated` tests run in CI, this error is seen:

```
inspec-reporter-html2::when run on a basic profile#test_0002_should produce valid HTML:
Errno::ENOENT: No such file or directory @ apply2files - /tmp/temp20200625-1802-2izu7e.html
    /usr/local/lib/ruby/2.6.0/fileutils.rb:1437:in `unlink'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:1437:in `block in remove_file'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:1442:in `platform_support'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:1436:in `remove_file'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:775:in `remove_file'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:562:in `block in rm'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:561:in `each'
    /usr/local/lib/ruby/2.6.0/fileutils.rb:561:in `rm'
    lib/plugins/inspec-reporter-html2/test/functional/inspec_reporter_html2_test.rb:9:in `teardown'
```

It should be OK to ignore the failure to delete the test file - the issue doesn't reproduce on laptops, and CI uses clean VMs each time.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-06-26 09:23:21 +01:00
Mary Jinglewski
ac615db4fb Copyediting
Signed-off-by: Mary Jinglewski <mjinglewski@chef.io>
2020-06-18 14:23:54 -04:00
Clinton Wolfe
bd292c9dbb Fix JS execution on Internet Explorer by adding MOTW
Mark of the Web is a special comment in HTML that IE looks for
to set the JS security zone when running a local HTML file.
See
http://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:23:54 -04:00
Clinton Wolfe
e4aa9f1793 Skip HTML validation testing on windows
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:23:54 -04:00
Clinton Wolfe
aa824d1b49 Fix a bad interaction involving clearing the plugin registry in unit testing
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:23:54 -04:00
Clinton Wolfe
83c7f84290 Add ability to show/hide child profiles, start off hidden
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:22:31 -04:00
Clinton Wolfe
adc59ea4ad Correct html validation assertion syntax
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:22:31 -04:00
Clinton Wolfe
b8b7e4e848 Add ability to inline alternate JS and CSS
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:22:31 -04:00
Clinton Wolfe
e7a5c59b90 Use PRODUCT_NAME from Dist to allow community to rebrand
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:21:51 -04:00
Clinton Wolfe
a131067a09 Add functional test, including html validation
This uses html-proofer, which adds in nokogiri as a testing dep.
I expect we'll be using nokogiri soon anyway for the JUnit reporter.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:21:51 -04:00
Clinton Wolfe
81e2f36fde Basic unit tests for plugin definition
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:21:51 -04:00
Clinton Wolfe
bb2dfaa02d First pass at docs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:21:13 -04:00
Clinton Wolfe
c4487f1892 Initial commit of inspec-reporter-html2
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:21:13 -04:00
Nick Schwaderer
7068694885 Revert "Make CLI reporter into a plugin"
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-06-18 12:30:15 +01:00
Nick Schwaderer
82c6472444
Merge pull request #5069 from inspec/cw/reporter-plugin-cli
Make CLI reporter into a plugin
2020-06-17 17:02:07 +01:00
Clinton Wolfe
3651f85a7c Use methods to access RunData
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-11 16:46:04 -04:00
Clinton Wolfe
98ae89e6cc Convert JUnit reporter to plugin, RunData is still Hash-based
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-11 16:46:04 -04:00
Clinton Wolfe
458a5c4410 Replace Hash RunData access with method calls
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-03 21:51:21 -04:00
Clinton Wolfe
76033c03ff Convert CLI reporter to plugin, RunData is still Hash-based
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-03 21:13:27 -04:00
Clinton Wolfe
935bb81e6f Use RunData object instead of Hash
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-02 15:29:52 -04:00
Clinton Wolfe
402366c219 Convert json-min to be a plugin reporter, rundata is still a Hash
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-02 15:29:52 -04:00
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
Miah Johnson
9fb755a213 Use EXIT value constants
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-30 13:19:43 -04:00
Miah Johnson
a524dc030f Convert to new Inspec::UI in inspec-plugin-manager-cli
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-30 13:19:43 -04:00
Clinton Wolfe
962ec0591e
Transition the Habitat plugin to use scaffolding (#4320)
Transition the Habitat plugin to use scaffolding
2019-07-29 12:50:49 -04:00
Ryan Davis
917a531a92 Skipped all failing tests on windows AT the failures site.
This activates a BUNCH of tests but keeps us green.

Whether these tests are valid or not is not being addressed here.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:09:08 -07:00
Ryan Davis
1d5d3dfc43 I don't know how I missed these. Removing the rest of the skip_windows calls.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-07-24 18:06:25 -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
John Snow
ea7956177a Fix tests to use only plan file
Signed-off-by: John Snow <thelunaticscripter@outlook.com>
2019-07-22 07:35:33 -04:00
John Snow
bbb809f703 Transition the Habitat plugin to use scaffolding
Signed-off-by: John Snow <thelunaticscripter@outlook.com>
2019-07-19 15:25:06 -04: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
Clinton Wolfe
e4e7c255de Automated chefstyle application for rubocop 0.72 compatibility
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-07-03 17:24:41 -04:00
James Stocks
3ef4092d39 Permit plugin to be in path with git ref
Fixes #3904

Signed-off-by: James Stocks <jstocks@chef.io>
2019-07-02 16:49:38 +01:00
Ryan Davis
387b713d79 Removing extra requires from inspec/profile.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 21:32:22 -07:00
Ryan Davis
692d6a9ab8 hand applied one that is now marked as unsafe in rubocop
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 18:52:38 -07:00
Miah Johnson
20531342d2 unused assignment
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-06-11 18:52:38 -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
Ryan Davis
58fa148773 Stabilize windows functional testing.
Skip most everything.

After some digging, in those tests that didn't have 100% failures, of
the ~10+% passing, those tests weren't checking enough. So I skip them
too in the hopes that we improve testing across the board.

At this point, we need appveyor to be green more than we need these
tests to be fixed. If that means we skip them, so be it.

These tests will time-bomb at the end of July.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-03 23:27:26 -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
Ryan Davis
fcb65b2ffb Fixed Inspec::Dist on habitat CLI.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 16:22:28 -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
Artem Sidorenko
e468c592ca Dist branding for plugins/inspec-habitat
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:56 +02:00
Artem Sidorenko
4c0260aedd Dist branding for plugins/inspec-artifact
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:49 +02:00
Artem Sidorenko
5a2bf961f8 Dist branding for plugins/inspec-plugin-manager-cli
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:36 +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
9b0d8edfb4 Fixed another bad test interaction.
This time between:

+ PluginManagerCliDefinitionTests#(?:test_plugin_registered
+ PluginLoaderTests#test_load_mock_plugin_by_gem

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -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
a53d118b3f Punting on 2 tests in inspec-plugin-manager-cli.
These two tests make assumptions that are not valid when bundler is
not being used.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
7935d5553d Fix how we're running inspec to include local lib dir.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
e7348f4d72 Add minitest/hell and parallelize_me! to the plugin tests.
We already do this in test/helper.rb so we might as well do it here.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
6235c3f658 Fixed missing requires
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Lynn Frank
4511ac6aaf Updates the init plugin desc to show proper usage
Obvious fix.
2019-05-16 16:43:05 -05: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
Clinton Wolfe
a282204b41 Update exe location in functional test helpers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-29 13:27:10 -06:00
Stuart Paterson
3f1ed29af8 Address PR feedback, add a comment to inspec.yml.
Signed-off-by: Stuart Paterson <spaterson@chef.io>
2019-04-08 14:30:21 -04:00
Stuart Paterson
549a04bdae Update README with the re-added security group control.
Signed-off-by: Stuart Paterson <spaterson@chef.io>
2019-04-08 14:30:21 -04:00