Manage External Services with pifpaf
Explore how to effectively manage external services needed for integration testing of distributed systems using pifpaf. Learn how this Python command line tool automates starting and stopping daemons like PostgreSQL and Redis, exports environment variables, and integrates with test suites for easier service orchestration and improved workflow.
We'll cover the following...
If writing shell scripts is not your favorite pastime, rest assured you are normal. The error handling in this kind of script is often wonky, the verbosity painful, and the tools available to help to build your workflow are very restricted. So while shell scripts are handy to use and write, they are a pain to maintain. They can become way too convoluted to handle.
Therefore, this chapter will include some shameless promotion of a tool I started to write a few months ago and that I use in many of my applications nowadays to facilitate integration testing. It is called pifpaf.
The problem that pifpaf solves is precisely the one covered in the previous lesson: how to start and stop systems needed to test integration with your applications.
pifpaf is a command line tool that allows starting any daemon from the command line, without having to set it up on your system, nor be an administrator. As long as the software is already installed, pifpaf is ...