{"action":"created","issue":{"url":"https://api.github.com/repos/revel/revel/issues/1405","repository_url":"https://api.github.com/repos/revel/revel","labels_url":"https://api.github.com/repos/revel/revel/issues/1405/labels{/name}","comments_url":"https://api.github.com/repos/revel/revel/issues/1405/comments","events_url":"https://api.github.com/repos/revel/revel/issues/1405/events","html_url":"https://github.com/revel/revel/issues/1405","id":377470372,"node_id":"MDU6SXNzdWUzNzc0NzAzNzI=","number":1405,"title":"Revel test command line tool gives return code 0 with failing tests","user":{"login":"stumo","id":1047730,"node_id":"MDQ6VXNlcjEwNDc3MzA=","avatar_url":"https://avatars2.githubusercontent.com/u/1047730?v=4","gravatar_id":"","url":"https://api.github.com/users/stumo","html_url":"https://github.com/stumo","followers_url":"https://api.github.com/users/stumo/followers","following_url":"https://api.github.com/users/stumo/following{/other_user}","gists_url":"https://api.github.com/users/stumo/gists{/gist_id}","starred_url":"https://api.github.com/users/stumo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stumo/subscriptions","organizations_url":"https://api.github.com/users/stumo/orgs","repos_url":"https://api.github.com/users/stumo/repos","events_url":"https://api.github.com/users/stumo/events{/privacy}","received_events_url":"https://api.github.com/users/stumo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"notzippy","id":1387526,"node_id":"MDQ6VXNlcjEzODc1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1387526?v=4","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false},"assignees":[{"login":"notzippy","id":1387526,"node_id":"MDQ6VXNlcjEzODc1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1387526?v=4","gravatar_id":"","url":"https://api.github.com/users/notzippy","html_url":"https://github.com/notzippy","followers_url":"https://api.github.com/users/notzippy/followers","following_url":"https://api.github.com/users/notzippy/following{/other_user}","gists_url":"https://api.github.com/users/notzippy/gists{/gist_id}","starred_url":"https://api.github.com/users/notzippy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notzippy/subscriptions","organizations_url":"https://api.github.com/users/notzippy/orgs","repos_url":"https://api.github.com/users/notzippy/repos","events_url":"https://api.github.com/users/notzippy/events{/privacy}","received_events_url":"https://api.github.com/users/notzippy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-11-05T16:11:31Z","updated_at":"2018-12-31T14:37:47Z","closed_at":null,"author_association":"NONE","body":"Steps to reproduce:\r\n\r\n`revel new blah`\r\n\r\n(go to directory)\r\n\r\n`revel test . ; echo $?` \r\n\r\n(All tests pass; error code 0 is returned as expected)\r\n\r\nEdit the sample test to fail, e.g. using AssertStatus(300)\r\n\r\n`revel test . ; echo $?`  - Revel test reports failures, but exit code is still 0\r\n\r\n\r\n```\r\n$ revel version\r\nRevel executing: displays the Revel Framework and Go version\r\n\r\nRevel Framework /home/stjm/go/src/github.com/revel/revel /home/stjm/go/src\r\nRevel Version = \"0.21.0\"\r\nRevel BuildDate = \"2018-10-30\"\r\nRevel MinimumGoVersion = \">= go1.8\"\r\n\r\nRevel Command Utility Tool\r\nVersion 0.20.2\r\nBuild Date 2018-10-02\r\nMinimum Go Version >= go1.8\r\nCompiled By   go1.10.1 linux/amd64\r\n\r\ngo version go1.10.4 linux/amd64\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/revel/revel/issues/comments/450652780","html_url":"https://github.com/revel/revel/issues/1405#issuecomment-450652780","issue_url":"https://api.github.com/repos/revel/revel/issues/1405","id":450652780,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY1Mjc4MA==","user":{"login":"eparziale","id":45942042,"node_id":"MDQ6VXNlcjQ1OTQyMDQy","avatar_url":"https://avatars0.githubusercontent.com/u/45942042?v=4","gravatar_id":"","url":"https://api.github.com/users/eparziale","html_url":"https://github.com/eparziale","followers_url":"https://api.github.com/users/eparziale/followers","following_url":"https://api.github.com/users/eparziale/following{/other_user}","gists_url":"https://api.github.com/users/eparziale/gists{/gist_id}","starred_url":"https://api.github.com/users/eparziale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparziale/subscriptions","organizations_url":"https://api.github.com/users/eparziale/orgs","repos_url":"https://api.github.com/users/eparziale/repos","events_url":"https://api.github.com/users/eparziale/events{/privacy}","received_events_url":"https://api.github.com/users/eparziale/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T14:37:47Z","updated_at":"2018-12-31T14:37:47Z","author_association":"NONE","body":"Agree this is an annoying aspect of revel test command, and my team faced the same issue.\r\n\r\nWe work around it in our continuous integration builds by piping test command output to stdout and to a file, then grepping the file for ERROR keyword and failing build if error encountered.\r\n\r\nHere are commands we run\r\n\r\n*Here we run the tests and ouput to stdout, as well as tee to testResults file\r\n` - run:\r\n        name: Run Integration tests\r\n        command: \"revel test myapp test 2>&1 | tee testResults \\n\"`\r\n\r\n*cat testResults file to double check that we actually captured all the output\r\n    `- run: cat testResults`\r\n\r\n*grep testResults file for ERROR keyword and exit with code 1 if true. Else exit 0\r\n    `- run:\r\n        name: Check Integration Test results\r\n        command: |-\r\n          grep -q 'ERROR' testResults && exit 1\r\n          exit 0`\r\n\r\nAlthough this isn't ideal (revel cmd tool should be updated to output proper exit code), this workaround may save you or others the hassle for now"}}
{"actor":{"display_login":"eparziale"}}