Perhaps rather than adding tests like this to the primary upgrade scripts, there should be a separate tool that does some consistency checks and reports that can be run from within the normal LedgerSMB UI, and a commandline.
The tests could be run as simple go/nogo with an option to show details of any problems for each test.
The upgrade scripts could then require that the tests have been run at least once since the last DB change and a state file (the go/nogo results) checked for issues that would be release blocking.
If the tests have not been run recently, then force them to run anyway.
This provides the advantage of being able to test the DB at any time with ease.
On 10/02/14 21:49, Chris Travers wrote: