↳
In-reply-to
»
Writing and running full e2e integration tests using Go and for Go CLI applications. Lookingo into one of:
β€ Read More
@lyse@lyse.isobeef.org Yeah I agree errors should be tested too. Thatβs why Main()
has the func Main(w io.Writer, args []string) error
π
So you can actually assert on the error
returned. For a CLI however, Iβm not particularly a fan of logging errors to stderr too much (if at all). And re go-cmdtest
FWIW a Terminal combines stdout and stderr too by default when displaying the output of a program π
β However I filed an issue against the cmdtest project and now Iβm not so sure I want to continue using it, I may as well just figure out how to run the test binary under coverage and write the tests myself in Go.