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

kitchen test destroys the instance with failing tests #16

Closed
artem-sidorenko opened this issue Dec 1, 2015 · 2 comments
Closed

kitchen test destroys the instance with failing tests #16

artem-sidorenko opened this issue Dec 1, 2015 · 2 comments
Labels
Type: Bug Doesn't work as expected.

Comments

@artem-sidorenko
Copy link

$ kitchen test generic-centos-71
-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of <generic-centos-71>
-----> Destroying <generic-centos-71>...
       Finished destroying <generic-centos-71> (0m0.00s).
-----> Testing <generic-centos-71>
-----> Creating <generic-centos-71>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'opscode-centos-7.1'...
....
       Chef Client finished, 0/0 resources updated in 01 seconds
       Finished converging <generic-centos-71> (0m55.43s).
-----> Setting up <generic-centos-71>...
       Finished setting up <generic-centos-71> (0m0.00s).
-----> Verifying <generic-centos-71>...
F

Failures:

  1) Command /bin/false exit_status should eq 0
     Failure/Error: its('exit_status') { should eq 0 }

       expected: 0
            got: 1

       (compared using ==)
.....

Finished in 0.07612 seconds (files took 1 minute 32.92 seconds to load)
1 example, 1 failure

Failed examples:

rspec  # Command /bin/false exit_status should eq 0

       Finished verifying <generic-centos-71> (0m1.37s).
-----> Destroying <generic-centos-71>...
       ==> default: Forcing shutdown of VM...
       ==> default: Destroying VM and associated drives...
       Vagrant instance <generic-centos-71> destroyed.
       Finished destroying <generic-centos-71> (0m7.11s).
       Finished testing <generic-centos-71> (1m39.90s).
-----> Kitchen is finished. (1m42.84s)
$ echo $?
0

with default behaviour of --destroy=passing of kitchen test the instance should be not destroyed.
Probably some return code to the kitchen about failures is missing somewhere?

Software versions:

$ chef --version
Chef Development Kit Version: 0.10.0
chef-client version: 12.5.1
berks version: 4.0.1
kitchen version: 1.4.2
$ chef exec gem list inspec

*** LOCAL GEMS ***

inspec (0.9.5, 0.9.2)
kitchen-inspec (0.9.0)
$ inspec version
0.9.5

Probably this is related to #9

@chris-rock chris-rock added the bug label Dec 1, 2015
@chris-rock
Copy link
Collaborator

@artem-sidorenko This is solved with the latest kitchen-inspec release. Please reopen if you are able to see this again. Be ware that this release is not yet part of ChefDK.

@artem-sidorenko
Copy link
Author

its solved by #13 in 0.9.6, thank you!

@tas50 tas50 added Type: Bug Doesn't work as expected. and removed bug labels Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants