25 lines
310 B
Go
25 lines
310 B
Go
package systems
|
|
|
|
import (
|
|
"clortho/lib/db"
|
|
"fmt"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
// Global setup
|
|
fmt.Println("Setting up resources...")
|
|
|
|
db.InitDb()
|
|
|
|
exitCode := m.Run() // Run all tests
|
|
|
|
// Global teardown
|
|
fmt.Println("Cleaning up resources...")
|
|
|
|
db.ResetDb()
|
|
|
|
os.Exit(exitCode)
|
|
}
|