Konubinix' opinionated web of thoughts

Several Flavors of Testing One's Code


When writing the code that measures whether one’s code actually keeps its promises, there are several ways of doing.

The simulation that resembles the most the end goal is most likely the one to prefer. Yet, sometimes, this needs to bootstrap a complicated setup to support this simulation.

For instance, if the code to test is used via some server side web API meant to be deployed as a helm application, one would want to start a k8s cluster to deploy the application.

In the CI, it is a good idea to either keep a cluster running or use earthly + clk k8s to create a cluster on the fly to run the test.

In the developer’s computer though, the earthly solution might be too long to bootstrap for each test. I’d recommend to use tilt to keep a long running cluster that the tests will be run against.