Explore >> Select a destination


You are here

filipnikolovski.com
| | markphelps.me
15.4 parsecs away

Travel
| | How To Write Tests for Your Database Code in Go Without Mocking SQL
| | konradreiche.com
6.8 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:
| | www.philosophicalhacker.com
20.4 parsecs away

Travel
| |
| | nodogmablog.bryanhogan.net
31.3 parsecs away

Travel
| In part two of this series you will see how to perform constructor and method dependency injection on simple AWS Lambda functions (deployed with `dotnet lambda deploy-function`) using the new Amazon.Lambda.Annotations library.