add tests for repository
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
2026-10-06 00:16:03 +02:00
parent e811fda863
commit 32f3f034eb
6 changed files with 100 additions and 0 deletions
@@ -0,0 +1,37 @@
package testutils
import (
"os"
"testing"
)
func SetupTestDatabase() {
}
func PatchDatabase() {
}
func TearDownTestDatabase() {
}
func UnpatchDatabase() {
}
func InitializeTestSuite(m *testing.M) {
// Initialize the test database
SetupTestDatabase()
// Patch the global database.DB to use the TestDB
PatchDatabase()
// Run all tests
code := m.Run()
// Teardown the database connection
TearDownTestDatabase()
// Unpatch the database
UnpatchDatabase()
// Exit with the test run status code
os.Exit(code)
}