[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data base sanity checks



I know there was a discussion about incorporating pg-tap into LedgerSMB, but I imagine that will require some longer-term effort.

I am wondering if in the mean time there would be a good way to perform some basic automated sanity checks indicating the prepare-database has done everything it is intended ... like maybe count the number of tables, functions, domains, and etc.

When testing trunk, oftentimes errors and rollbacks occur, and I can recognize that when only two tables end up being created that something went wrong, but how would I know that 124 or 157 or whatever tables is the right number? I know I can redirect the output of the script to a file and grep for ERROR, which I do, but there are some inconsequential "errors" like objects already existing. I was thinking about some built-in automated correctness checking so the script can tell me directly if it completed all tasks.