Testing Examples
Concurrency Demos
-
problems: https://github.com/loong/go-concurrency-exercises
-
demos of different Go unit testing paterns: https://github.com/yakuter/go-test-examples
-
integration testing with serverless: https://github.com/viant/endly/
-
as shown here: https://github.com/adrianwit/serverless_e2e
-
protobuff e2e test: https://github.com/110y/go-e2e-example/blob/master/server/server_test.go
-
integration test with databases: https://github.com/george-e-shaw-iv/integration-tests-example
-
http request example: https://github.com/nathanleclaire/testing-article/blob/master/example2/gh_test.go
-
website polling system: https://github.com/nathanleclaire/testing-article/blob/master/example3/job_test.go
-
header access checks: https://github.com/nathanleclaire/testing-article/blob/master/example4/server_test.go
-
redis ip rate limiter: https://github.com/euclidr/testingo/blob/master/limiter_test.go
-
function type that implements interface: https://github.com/euclidr/testingo/blob/master/httpreq_test.go#L13
-
complex demo of solid + protobufs using http transport: https://github.com/caudaganesh/go-pbt-demo
-
microservices testing using mocks for sql: https://github.com/nicholasjackson/testing-microservices/blob/main/handlers/branches_test.go
Ideas:
- struct embedding for overloading just a single method: https://github.com/george-e-shaw-iv/integration-tests-example/blob/master/internal/platform/web/middleware.go#L20
- pprof cpu usage: https://github.com/jeffotoni/goexample/blob/master/pprof.go/pprof2.go
- creating sessions from a webform: https://github.com/aditya43/golang-101/blob/master/100-Sessions/09-Middleware/main.go
Articles: