vaulterm/server/tests/setup_test.go

25 lines
292 B
Go
Raw Normal View History

2024-11-07 19:07:41 +00:00
package tests
import (
"log"
"os"
"testing"
2024-11-16 02:34:07 +07:00
"rul.sh/vaulterm/server/db"
2024-11-07 19:07:41 +00:00
)
func TestMain(m *testing.M) {
log.Println("Starting tests...")
test := NewTest(nil)
// Run all tests
code := m.Run()
log.Println("Cleaning up...")
// Clean up
test.Close()
db.Close()
os.Exit(code)
}