func CleanupDb(db *sql.DB) {
	filename := filepath.Clean(path.Join(moduleRoot, "..", dbCleanupScript))
	script, err := ioutil.ReadFile(filename)
	if err != nil {
		log.Fatalf("Failed to read cleanup.sql: %s", err)
	}

	_, err = db.Exec(string(script))
	if err != nil {
		log.Fatalf("Failed to run cleanup.sql: %s", err)
	}
}
// CleanupDb cleans the data written to the db during tests
CleanupDb cleans the data written to the db during tests
// CleanupDb cleans the data written to the db during tests
func CleanupDb(db *sql.DB) {
	filename := filepath.Clean(path.Join(moduleRoot, "..", dbCleanupScript))
	script, err := ioutil.ReadFile(filename)
	if err != nil {
		log.Fatalf("Failed to read cleanup.sql: %s", err)
	}
	_, err = db.Exec(string(script))
	if err != nil {
		log.Fatalf("Failed to run cleanup.sql: %s", err)
	}
}
func CleanupDb ( db * sql . DB ) { filename := filepath . Clean ( path . Join ( moduleRoot , " " , dbCleanupScript ) ) script , err := ioutil . ReadFile ( filename ) if err != nil { log . Fatalf ( " " , err ) } _ , err = db . Exec ( string ( script ) ) if err != nil { log . Fatalf ( " " , err ) } }
CleanupDb cleans the data written to the db during tests
CleanupDb cleans the data written to the db during tests