cucumber / godog

Cucumber for golang
MIT License
2.31k stars 251 forks source link

Exit status is not correct #25

Closed johanlunds closed 8 years ago

johanlunds commented 8 years ago

See example below.

vagrant@fishbrain-bonito:~/go/src/github.com/fishbrain/bonito$ make integration
export GOPATH=`pwd`/:`pwd`/vendor/:/home/vagrant/go && godog
Feature: Customer.io Notifications

  Scenario: Success                                                                            # ../customerio.feature:6

[...]

    returned body was not expected. Actual: {"data":{"avatar":"https://cdn-staging.fishbrain.com/avatar/42/big","firstname":"John","follow_url":"https://deeplink.me/staging.fishbrain.com/profile/Johan","lastname":"Smith","name":"Angler follow you","type":"new_follower","username":"Johan"},"name":"new_follower"}

--- Failed scenarios:

    ../customerio.feature:10

1 scenarios (1 failed)
4 steps (3 passed, 1 failed)
624.71419ms
exit status 1
vagrant@fishbrain-bonito:~/go/src/github.com/fishbrain/bonito$ echo $?
0
l3pp4rd commented 8 years ago

hm, interesting, will need to check. which os and go version?

l3pp4rd commented 8 years ago

tested with a tip version and 1.6.2 on linux, works as expected. maybe you could try to debug few lines of code godog does not use syscalls to determine exit status, but instead stderr output from the command, as it always prints the exit status. maybe somehow the output was combined to stdout in your case.

johanlunds commented 8 years ago

Stdout/Stderr being combined is a possibility.

Go version + OS: 1.6.? and Ubuntu Linux in a Vagrant/Virtualbox VM.

We switched to Gucumber instead because of the troubles with Godog unfortunately. So I won't do anything further on this. Sorry! If you want to, you can close the issue.

l3pp4rd commented 8 years ago

it would be great, if you could test the update. If another tool solves your problems better, then sure. Probably it is not convenient to use with GB too, that also depends on which vendoring tool go community decides to go with in the future. Gucumber is probably more mature, godog is still young and there will be some issues and maybe design changes until it reaches v1. I'm sure I will maintain it in the future.

johanlunds commented 8 years ago

Awesome to hear! Thanks for open sourcing!