{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/360","repository_url":"https://api.github.com/repos/test-kitchen/test-kitchen","labels_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/360/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/360/comments","events_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/360/events","html_url":"https://github.com/test-kitchen/test-kitchen/issues/360","id":27648946,"number":360,"title":"Bats tests are being executed even missing specification","user":{"login":"epcim","id":1211552,"avatar_url":"https://avatars.githubusercontent.com/u/1211552?v=3","gravatar_id":"","url":"https://api.github.com/users/epcim","html_url":"https://github.com/epcim","followers_url":"https://api.github.com/users/epcim/followers","following_url":"https://api.github.com/users/epcim/following{/other_user}","gists_url":"https://api.github.com/users/epcim/gists{/gist_id}","starred_url":"https://api.github.com/users/epcim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epcim/subscriptions","organizations_url":"https://api.github.com/users/epcim/orgs","repos_url":"https://api.github.com/users/epcim/repos","events_url":"https://api.github.com/users/epcim/events{/privacy}","received_events_url":"https://api.github.com/users/epcim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2014-02-15T13:20:35Z","updated_at":"2016-09-27T13:44:22Z","closed_at":"2016-01-14T01:08:44Z","body":"I have defined a suite with only 'serverspec' tests specified. No bats, no minitest. However the `kitchen verify` execution failed on bats busser execution.\r\n\r\nTest Kitchen version 1.2.1\r\n\r\n```\r\n# kitchen verify ops\r\n-----> Starting Kitchen (v1.2.1)\r\n-----> Setting up <ops-ubuntu-1204>...\r\n-----> Setting up Busser       \r\n       Creating BUSSER_ROOT in /tmp/busser\r\n       Creating busser binstub\r\n       Plugin serverspec already installed       \r\n       Finished setting up <ops-ubuntu-1204> (1m17.72s).\r\n-----> Verifying <ops-ubuntu-1204>...\r\n       Removing /tmp/busser/suites/serverspec       \r\nUploading /tmp/busser/suites/serverspec/bind_daemon_spec.rb (mode=0644)       \r\n-----> Running bats test suite       \r\nbats: /tmp/busser/suites/bats does not exist\r\n**Command [/tmp/busser/vendor/bats/bin/bats /tmp/busser/suites/bats] exit code was 1**     \r\n>>>>>> Verify failed on instance <ops-ubuntu-1204>.\r\n>>>>>> Please see .kitchen/logs/ops-ubuntu-1204.log for more details\r\n>>>>>> ------Exception-------\r\n>>>>>> Class: Kitchen::ActionFailed\r\n>>>>>> Message: SSH exited (1) for command: [sh -c 'BUSSER_ROOT=\"/tmp/busser\" GEM_HOME=\"/tmp/busser/gems\" GEM_PATH=\"/tmp/busser/gems\" GEM_CACHE=\"/tmp/busser/gems/cache\" ; export BUSSER_ROOT GEM_HOME GEM_PATH GEM_CACHE; sudo -E /tmp/busser/bin/busser test']\r\n>>>>>> ----------------------\r\n```\r\n\r\n\r\nWhen dummy Bats defined\r\n```\r\n# kitchen verify ops                                                                       <<<\r\n-----> Starting Kitchen (v1.2.1)\r\n-----> Verifying <ops-ubuntu-1204>...\r\n       Removing /tmp/busser/suites/serverspec       \r\nUploading /tmp/busser/suites/bats/verify_examples.bats (mode=0644)       \r\nUploading /tmp/busser/suites/serverspec/bind_daemon_spec.rb (mode=0644)       \r\n-----> Running bats test suite       \r\n ✓ directory /etc exist       \r\n       \r\n1 test, 0 failures       \r\n-----> Running minitest test suite       \r\n/opt/chef/embedded/bin/ruby  -I\"/opt/chef/embedded/lib/ruby/1.9.1\" \"/opt/chef/embedded/lib/ruby/1.9.1/rake/rake_test_loader.rb\"         \r\n-----> Running serverspec test suite       \r\n/opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -S /opt/chef/embedded/bin/rspec /tmp/busser/suites/serverspec/bind_daemon_spec.rb --color --format documentation       \r\n       \r\n       Bind Daemon\r\n  is listening on port 53   \r\n```"},"comment":{"url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/comments/249868828","html_url":"https://github.com/test-kitchen/test-kitchen/issues/360#issuecomment-249868828","issue_url":"https://api.github.com/repos/test-kitchen/test-kitchen/issues/360","id":249868828,"user":{"login":"amontalban","id":941928,"avatar_url":"https://avatars.githubusercontent.com/u/941928?v=3","gravatar_id":"","url":"https://api.github.com/users/amontalban","html_url":"https://github.com/amontalban","followers_url":"https://api.github.com/users/amontalban/followers","following_url":"https://api.github.com/users/amontalban/following{/other_user}","gists_url":"https://api.github.com/users/amontalban/gists{/gist_id}","starred_url":"https://api.github.com/users/amontalban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amontalban/subscriptions","organizations_url":"https://api.github.com/users/amontalban/orgs","repos_url":"https://api.github.com/users/amontalban/repos","events_url":"https://api.github.com/users/amontalban/events{/privacy}","received_events_url":"https://api.github.com/users/amontalban/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T13:44:22Z","updated_at":"2016-09-27T13:44:22Z","body":"Hi @cheeseplus,\r\n\r\nI'm reopening this issue because I think it's a test-kitchen issue.\r\n\r\nCheck this lines: https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/verifier/busser.rb#L95-L107\r\n\r\nHere test-kitchen is calling busser with command `busser test` this is fine, but busser by default will run the bats tests unless you call it with `busser test serverspec` so I think that since we get the plugins names that needs to be installed in the test machine in [1] based on the directories in `config[:test_base_path]` we should also run the `busser test` command with the plugin name as a suffix.\r\n\r\nLet me know your thoughts.\r\n\r\nThanks!\r\n\r\n[1] https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/verifier/busser.rb#L230-L242"}}
{"actor":{"display_login":"amontalban"}}