Test a Docker image with TerraTest
In this story, we will see how to test a Docker image. We will create a file in the Docker image and we will check this file exists and has the expected content. For that, we will use TerraTest. This example is based on the official example of the TerraTest git repository.
Before to start, we have to install Go. For that, go to https://go.dev/dl/ and install the binary.
Now, we will create a Docker image, we will create a test, and we will run the test.