Substituting parameters in check files
Status: Beta
Brought to you by:
vbergmann
Something that would be incredibly useful would the the ability to pass parameters to DB Sanity which it would then substitute into the check files.
For example, say I'm doing a daily load into a database and want to check if today's load passed the DB Sanity suite. I could do something like:
./dbsanity ... myproject -D date=2012-09-23
In the tests XML I could write
...
<sql>SELECT foo FROM bar WHERE something_not_sane AND load_date=${date}</sql>
...
There may be other places it would be useful too:
<values expression="rank" list="1, 2, 3, ${another.valid.value}" />
Or:
<numberSize expression="delivery_time" min="1" max="${current.max}" />