test for env vars and set db accordingly