Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lifecycle Hooks Do Not Fire If InSpec Tests Fail #276

Open
paulcalabro opened this issue Mar 19, 2021 · 1 comment
Open

Lifecycle Hooks Do Not Fire If InSpec Tests Fail #276

paulcalabro opened this issue Mar 19, 2021 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@paulcalabro
Copy link

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.

@paulcalabro
Copy link
Author

Is there any missing information I can provide to troubleshoot this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant