Skip to content

Lifecycle Hooks Do Not Fire If InSpec Tests Fail #276

@paulcalabro

Description

@paulcalabro

Version:

kitchen-inspec 2.4.0

Environment:

Virtual machine running Ubuntu 20.04

Scenario:

I have a post-verify lifecycle hook that is used to collect data from the virtual machine after the verification phase.
It runs when the single test passes, however, it never executes when the single test fails.

Steps to Reproduce:

Include a post_verify lifecycle hook in your Test Kitchen configuration file:

lifecycle:
  post_verify:
    - <DO SOMETHING>

Create a test that always fails. Notice how the hook does not execute.
Create a test that always passes. Notice how the hook does execute.

Expected Result:

Expect all command to execute regardless of test results.

Actual Result:

The commands do not execute if the test fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions