Unit Testing with Auto-generated REST Clients

Oftentimes in our application we have to call HTTP endpoints to send or request data. If we are lucky, the service maintainer provides a client implementation to make it easier to use the provided REST API from our application directly. If we are less lucky there is an OpenApi spec that we can use to generate the client so we don’t have to craft the requests and process the responses manually.
Read more

Integration Tests in Go

In this piece of article I’m going to go through how to write extensive integration tests for our Go applications. The purpose of this exercise is to be able to write integration tests without mocking too much dependencies but also avoid connecting to other services, ie. remote servers, remote databases, etc. Everything should exist locally on the host running the test, and the test should be able to setup testing environment without external tools.

Read more