Automation · Automation Design
Postconditions
Cheat sheet · https://pcornel.dk/topic.php?topic=5197
Answer
Postconditions are checks after an automation job that confirm the intended result, such as the service responding, the config applied or the user existing, before the job reports success.
Remember
- Check the result, not just the exit code.
- Service responding, config applied, object exists.
- Fail if postconditions fail.
First checks
- Postcondition checks (service up, config applied) — verification
- Health checks after change — validation
- Automatic rollback on failed postcondition — safety
Verify in this order
change → verify postconditions → success or rollback
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5197