test database creation, and appropriate cleanup