Learn Go with Tests: Intro to acceptance tests
We've been running into the need to have "graceful shutdown" for our services.
Graceful shutdown is making sure your system finishes its work properly before it is terminated. A real-world analogy would be someone trying to wrap-up a phone call properly before moving on to the next meeting, rather than just hanging-up mid-sentence.
This post will give an intro to graceful shutdown in the context of a HTTP server, and how to write "acceptance tests" to give yourself confidence in the behaviour of your code.
After reading this you'll know how to share packages with excellent tests, reduce maintenance efforts and, increase confidence in the quality of your work.