pytest: Expand test inputs using dynamic fixtures

When writing tests in Python, I always choose the pytest test framework. It’s concise, feature-rich has a great ecosystem of plugins, is widely used, and supported in the community. One aspect which makes it blend seamlessly with the code under test is how test input can be passed to it. Within this part of the usual arrange-act-assert structure of tests, let’s explore one particular feature: parametrization.

Dockerize a Ruby application

In this post I describe my journey from knowing essentially nothing about Docker to having a dockerized Padrino application with each service living in its own container (more on that below). We begin with the very basics: ensuring that Docker and docker-compose are installed, creating a minimal Docker setup, and generating a new toy Padrino application within its container. We then continue with a brief overview of the most basic Docker nomenclature and concepts and apply it to our setup by describing one container for each service: the Padrino application backed by a PostgreSQL database. Finally, we discuss how to initialize our PostgresSQL database and running commands inside containers, and how to upgrade whole containers