Testing ain't hard, even for SysAdmins
summary
Claim: testing small sysadmin scripts is practical and stops touching production. Demonstrates a script that interacts with saltstack to discover minions, order monthly package updates and staged reboots, and shows tests that use mock.patch and magic mock to avoid a real master, run under nose and Python’s unit test. Tests catch prompting, call arguments and config-file paths; the script improves but still uncovers new production edge cases so it’s useful but not a one‑off guarantee.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:04What is Saltstack
- 7:51Package Modules
- 11:32Starting point
- 13:44Testing a script
- 15:34Testing inside a script
- 18:09Not throwing an exception
- 18:48Patch replaces functionality
- 20:30Configuration files
- 22:45General principle
- 23:25QA
related talks
26mA Unit Test Would Have Caught This...
28mFrom Monitoring to Automated Testing of Your Infrastructure Code
37mSalting things up in the sysadmin's world
24mTesting Your Python Code
01h 02mThe Art & Joy of Testing in Production
46mInfrastructure testing - it's a real thing!
28mDo You Know If Your Service Is Working Properly?...
01h 05mMicrotesting
