update test_db to handle environments