func (env *testEnv) Cleanup() { os.RemoveAll(env.conf.DBPath) //create a new connection couchDB, _ := couchdb.CreateConnectionDefinition(env.couchDBAddress, env.couchDatabaseName, env.couchUsername, env.couchPassword) //drop the test database if it already existed couchDB.DropDatabase() }
func (env *testEnvHistoryCouchDB) cleanup() { //create a new connection couchDB, err := couchdb.CreateConnectionDefinition(env.couchDBAddress, env.couchDatabaseName, env.couchUsername, env.couchPassword) if err == nil { //drop the test database if it already existed couchDB.DropDatabase() } }