Explore >> Select a destination


You are here

blog.gopheracademy.com
| | damienradtke.com
17.4 parsecs away

Travel
| |
| | konradreiche.com
17.7 parsecs away

Travel
| | There are different ways of separating integration tests from your unit tests in Go. After discovering too many issues with some of the approaches I have settled with the following. func TestDatabase(t *testing.T) { integrationTest(t) // ... } func integrationTest(t *testing.T) { t.Helper() if os.Getenv("INTEGRATION") == "" { t.Skip("skipping integration tests, set environment variable INTEGRATION") } } Integration tests are marked as such at the top of the test function, similar to using t.Helper(). A test helper function is used to skip the test unless the environment variable is set. All tests, including integration tests, can be run with:
| | markphelps.me
14.9 parsecs away

Travel
| | Converting a library that used code generation to generics in Go 1.18
| | johannesbrodwall.com
75.7 parsecs away

Travel
|