Comment

Comment by cyri

well written post!

one minor thing: I've skipped using build tags for integration tests because those tests will be out of sync one day with your main code, even with Goland (?).

Instead I use the usual test and check if an environment variable is set, if not, then

    t.Skipf("env var %q not set, skipping integration test",envVarName)
or you can use an additional CLI flag, e.g. in `feature_test.go` write

    func init() { flagIntegration := flag.Bool("test.integration",false,"run int tests") }
then

    $ go test -v -test.integration
parent cyri 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton