{"action":"created","issue":{"url":"https://api.github.com/repos/chef/inspec/issues/2608","repository_url":"https://api.github.com/repos/chef/inspec","labels_url":"https://api.github.com/repos/chef/inspec/issues/2608/labels{/name}","comments_url":"https://api.github.com/repos/chef/inspec/issues/2608/comments","events_url":"https://api.github.com/repos/chef/inspec/issues/2608/events","html_url":"https://github.com/chef/inspec/issues/2608","id":296254048,"number":2608,"title":"InSpec 1.51.x - kitchen verify does not output test results","user":{"login":"MichaelMcClanahan","id":25490773,"avatar_url":"https://avatars2.githubusercontent.com/u/25490773?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelMcClanahan","html_url":"https://github.com/MichaelMcClanahan","followers_url":"https://api.github.com/users/MichaelMcClanahan/followers","following_url":"https://api.github.com/users/MichaelMcClanahan/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMcClanahan/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMcClanahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMcClanahan/subscriptions","organizations_url":"https://api.github.com/users/MichaelMcClanahan/orgs","repos_url":"https://api.github.com/users/MichaelMcClanahan/repos","events_url":"https://api.github.com/users/MichaelMcClanahan/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMcClanahan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-12T02:50:21Z","updated_at":"2018-02-13T20:56:06Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n\r\n`kitchen verify` with InSpec `1.51.0`, `1.51.6`, or `1.51.15` does not output test results.\r\n\r\nFor example, I write a test that verifies that package `httpd` is installed. This test will fail because I have not installed the package yet in my recipe. I would expect to be told the reason for the failure but I am not.\r\n\r\n#### Bad output\r\n\r\nMy `Gemfile` is using `1.51.x` (`1.51.0`, `1.51.6`, and `1.51.15` all have the same issue)\r\n```\r\ngem 'berkshelf'\r\ngem 'chefspec'\r\ngem 'inspec', '~> 1.51.0'\r\ngem 'kitchen-inspec'\r\ngem 'kitchen-vagrant'\r\ngem 'test-kitchen'\r\n```\r\n```\r\n$ bundle exec kitchen verify\r\n-----> Starting Kitchen (v1.20.0)\r\n-----> Verifying <default-centos-7>...\r\n       Loaded tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"}\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: 1 actions failed.\r\n>>>>>>     Verify failed on instance <default-centos-7>.  Please see .kitchen/logs/default-centos-7.log for more details\r\n>>>>>> ----------------------\r\n>>>>>> Please see .kitchen/logs/kitchen.log for more details\r\n>>>>>> Also try running `kitchen diagnose --all` for configuration\r\n```\r\n\r\n#### Good output\r\n\r\nMy `Gemfile` locked to `1.50.1`\r\n```\r\nsource 'https://rubygems.org'\r\n\r\ngem 'berkshelf'\r\ngem 'chefspec'\r\ngem 'inspec', '= 1.50.1'\r\ngem 'kitchen-inspec'\r\ngem 'kitchen-vagrant'\r\ngem 'test-kitchen'\r\n```\r\n```\r\n$ bundle exec kitchen verify\r\n-----> Starting Kitchen (v1.20.0)\r\n-----> Verifying <default-centos-7>...\r\n       Loaded tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"}\r\n\r\nProfile: tests from {:path=>\"/Users/michaelmcclanahan/projects/inspec-test/cookbooks/test_cookbook/test/smoke/default\"} (tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"})\r\nVersion: (not specified)\r\nTarget:  ssh://vagrant@127.0.0.1:2222\r\n\r\n\r\n  System Package\r\n     ∅  httpd should be installed\r\n     expected that `System Package httpd` is installed\r\n\r\nTest Summary: 0 successful, 1 failure, 0 skipped\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: 1 actions failed.\r\n>>>>>>     Verify failed on instance <default-centos-7>.  Please see .kitchen/logs/default-centos-7.log for more details\r\n>>>>>> ----------------------\r\n>>>>>> Please see .kitchen/logs/kitchen.log for more details\r\n>>>>>> Also try running `kitchen diagnose --all` for configuration\r\n```\r\n\r\n#### Same case is true even when a test is passing\r\n\r\n```\r\n$ bundle exec kitchen verify\r\n-----> Starting Kitchen (v1.20.0)\r\n-----> Verifying <default-centos-7>...\r\n       Loaded tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"}\r\n       Finished verifying <default-centos-7> (0m0.79s).\r\n-----> Kitchen is finished. (0m1.80s)\r\n```\r\n```\r\n$ bundle exec kitchen verify\r\n-----> Starting Kitchen (v1.20.0)\r\n-----> Setting up <default-centos-7>...\r\n       Finished setting up <default-centos-7> (0m0.00s).\r\n-----> Verifying <default-centos-7>...\r\n       Loaded tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"}\r\n\r\nProfile: tests from {:path=>\"/Users/michaelmcclanahan/projects/inspec-test/cookbooks/test_cookbook/test/smoke/default\"} (tests from {:path=>\".Users.michaelmcclanahan.projects.inspec-test.cookbooks.test_cookbook.test.smoke.default\"})\r\nVersion: (not specified)\r\nTarget:  ssh://vagrant@127.0.0.1:2222\r\n\r\n\r\n  System Package\r\n     ✔  httpd should be installed\r\n\r\nTest Summary: 1 successful, 0 failures, 0 skipped\r\n       Finished verifying <default-centos-7> (0m0.81s).\r\n-----> Kitchen is finished. (0m1.80s)\r\n```\r\n\r\n### InSpec and Platform Version\r\n\r\n- inspec `1.51.0`, `1.51.6`, or `1.51.15`\r\n- test-kitchen `1.20.0`\r\n- kitchen-inspec `0.22.0`\r\n- kitchen-vagrant `1.3.0`\r\n- MacOS\r\n\r\n### Replication Case\r\n\r\nIn your `Gemfile`, use inspec `1.51.0`, `1.51.6`, or `1.51.15`. \r\n\r\n`test/smoke/default/default_test.rb`\r\n```\r\ndescribe package('httpd') do\r\n  it { should be_installed }\r\nend\r\n```\r\n`recipes/default.rb`\r\n```\r\n#\r\n# Cookbook:: webserver_test\r\n# Recipe:: default\r\n#\r\n# Copyright:: 2018, The Authors, All Rights Reserved.\r\n\r\n# There is nothing here!\r\n```\r\n\r\n### Possible Solutions\r\n\r\nPin your InSpec version to `1.50.1` until a fix is released.\r\n\r\n### Stacktrace\r\n\r\nSee the above Description.\r\n"},"comment":{"url":"https://api.github.com/repos/chef/inspec/issues/comments/365401251","html_url":"https://github.com/chef/inspec/issues/2608#issuecomment-365401251","issue_url":"https://api.github.com/repos/chef/inspec/issues/2608","id":365401251,"user":{"login":"MichaelMcClanahan","id":25490773,"avatar_url":"https://avatars2.githubusercontent.com/u/25490773?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelMcClanahan","html_url":"https://github.com/MichaelMcClanahan","followers_url":"https://api.github.com/users/MichaelMcClanahan/followers","following_url":"https://api.github.com/users/MichaelMcClanahan/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMcClanahan/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMcClanahan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMcClanahan/subscriptions","organizations_url":"https://api.github.com/users/MichaelMcClanahan/orgs","repos_url":"https://api.github.com/users/MichaelMcClanahan/repos","events_url":"https://api.github.com/users/MichaelMcClanahan/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMcClanahan/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T20:56:06Z","updated_at":"2018-02-13T20:56:06Z","author_association":"NONE","body":"Looks to be fixed! Thank you."}}
{"actor":{"display_login":"MichaelMcClanahan"}}