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

Skipped tests report as failures in kitchen #125

Closed
mattstratton opened this issue Jan 20, 2017 · 2 comments
Closed

Skipped tests report as failures in kitchen #125

mattstratton opened this issue Jan 20, 2017 · 2 comments

Comments

@mattstratton
Copy link

When using the default tests created by chef generate cookbook, if I leave them in, and they fail, even though they are marked skip, they report as a failure in kitchen.

Test:

unless os.windows?
  describe user('root') do
    it { should exist }
    skip 'This is an example test, replace with your own test.'
  end
end

describe port(80) do
  it { should_not be_listening }
  skip 'This is an example test, replace with your own test.'
end

If the machine does reply on port 80, this is the output of kitchen verify:

  User root
     ✔  should exist
     ↺  This is an example test, replace with your own test.
  Port 80
     ∅  should not be listening
     expected `Port 80.listening?` to return false, got true
     ↺  This is an example test, replace with your own test.

Test Summary: 1 successful, 1 failures, 2 skipped
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Verify failed on instance <default-centos-72>.  Please see .kitchen/logs/default-centos-72.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
@mattstratton
Copy link
Author

It's possible that this test shouldn't behave the way that chef generate cookbook seems to think it would - which would make this a ChefDK issue. Thoughts?

@mattstratton
Copy link
Author

This appears to be more of an issue with the cookbook generator in ChefDK. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant