Exemplo n.º 1
0
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()
}
Exemplo n.º 2
0
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()
	}
}