Optionally choose test DB

Found it useful to test against sqlite locally.

Fixes #3786