Proposal: Should we use gocheck?

Hi Everyone,

OK, so I’m hacking away at the utils package at the minute and generally making quite a bit of progress. It looked untestable at first glance but I’ve worked worked out how. As I type this the test coverage has jumped from 11% to 44% and I should be able to hit 90+% by the time I’m done.

Now at the minute I’m just using go’s standard testing package. But I’m wondering if this a good idea, and if we should be using something that is a little less verbose. Yes, I know the go FAQ is anti-assertions, see:
But as I read that that the go creators mean runtime assertions in production code, not using assertions to test in a testing scenario. So I don’t believe this proposal goes against go’s style…

A quick bit of Googling throws up Gustavo Niemeyer’s gocheck package.
And I’m wondering if we should standardise on this package when we write tests?

So @natefinch. As you and Gustavo both work on juju, and juju uses gocheck, what do you think? I’ve not tried gocheck yet, but it looks like an xUnit style testing kit - so it’ll be familiar to most people, and appears to be direct extension to the standard libraries testing package.

If anyone has any thoughts can you let me know to see what the feeling in within the Hugo community is.



Not strong opninions about this, but notice is in use in Hugo today. Adding more test frameworks that does similar things may not be the best way.

As to standardise: I think people who writes and wants to continue to write clean tests with Go’s testing package should be allowed to continue to do so.