inspec / kitchen-inspec

Test-Kitchen Plugin for InSpec
Other
109 stars 58 forks source link

v2.4.0 Regression: reporters #273

Closed deric4 closed 3 years ago

deric4 commented 3 years ago

Version:

test-kitchen: 2.10.0 kitchen-inspec: 2.4.0 inspec-core: 4.26.4

Environment:

Scenario:

The newest release of of kitchen-inspec-2.4.0 is causing previously valid kitchen configuration to fail in CI.

Steps to Reproduce:

---
driver:
  name: ec2
  interface: public
  instance_type: t3.medium
  region: <%= ENV['AWS_DEFAULT_REGION'] %>
transport:
  username: ec2-user
verifier:
  name: inspec

platforms:
  - name: my-platform
    driver:
      image_id: <%= ENV['AMI_ID'] %>

provisioner:
  name: shell
  command: 'hostname' 
  sudo: true

suites:
  - name: default
    includes:
      - my-platform
    verifier:
      name: inspec
      sudo: true
      reporter:
        - cli
        - junit2:artifacts/%{platform}_%{suite}_inspec.xml
        - json:artifacts/%{platform}_%{suite}_inspec.json
        - json-rspec:artifacts/%{platform}_%{suite}_inspec-rspec.json
      inspec_tests:
        - git: https://github.com/dev-sec/cis-dil-benchmark.git
      inputs:
        cis_level: 1

Expected Result:

Kitchen does not error because of an invalid reporter type

Actual Result:

Kitchen errors because junit2 is not a valid reporter type

$ bundle exec kitchen verify
-----> Starting Test Kitchen (v2.10.0)
-----> Verifying <default-my-platform>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #verify action: ['junit2' is not a valid reporter type.] on default-my-platform
clintoncwolfe commented 3 years ago

I've verified that this is a regression - junit2 works in 2.3.0 and not in 2.4.0.