inspec/test/unit/mock/reporters/json_min_output
Jared Quick 9930e40a76 Add new "reporter" system (replacement for "formatters"), support multiple reporters per run (#2464)
* Formatter and reporter refactor.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add exception and backtrace to json-min report.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add sha to json-min and include generator version for json profile.

Signed-off-by: Jared Quick <jquick@chef.io>

* Fix deprecated typo and add fallback for cli resource title.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update to build json report and clean up cli logic.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add tests for json reporter.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add cli suppress_log_output? and a fallback for invalid reporter type.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update suppress_log_output? to check if we are outputting to stdout.

Signed-off-by: Jared Quick <jquick@chef.io>

* Update reporter cli optoins to work with json_config.

Signed-off-by: Jared Quick <jquick@chef.io>

* Refactor some safe-navigation and variable names.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add thor banner to show reporter file output syntax.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-02-08 10:06:58 +01:00

1 line
1 KiB
Text

{"controls":[{"id":"(generated from example.rb:7 871cd54043069c5c4f6e382fd5627830)","profile_id":"long_commands","profile_sha256":"4f816f8cf18f165f05f1cf20936aaad06a15287de3f578891197647ca05c7df4","status":"passed","code_desc":"File /tmp should be directory"},{"id":"tmp-1.0","profile_id":"long_commands","profile_sha256":"4f816f8cf18f165f05f1cf20936aaad06a15287de3f578891197647ca05c7df4","status":"passed","code_desc":"File /tmp should be directory"},{"id":"(generated from example.rb:21 2ff474c5357e7070f4c3efa932032dcb)","profile_id":"long_commands","profile_sha256":"4f816f8cf18f165f05f1cf20936aaad06a15287de3f578891197647ca05c7df4","status":"failed","code_desc":"gem package rubocop should be installed"},{"id":"(generated from run_command.rb:5 a411d4ded1530b2f48170840e1127584)","profile_id":"long_commands","profile_sha256":"4f816f8cf18f165f05f1cf20936aaad06a15287de3f578891197647ca05c7df4","status":"passed","code_desc":"Command whoami stdout should eq \"jquick\\n\""}],"statistics":{"duration":0.039182},"version":"1.49.2"}