mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-25 03:42:06 +00:00
0a1dbc8c73
newPadServer (internal/mcp), testStoreOAuth (internal/oauth), and newMetricsTestServer (internal/server) were left on the slow per-call migration path after IDEA-1914/#788 wired testServer and store's white-box testStore onto storetest.NewSQLite. Switch all three, and add minimal TestMains to internal/mcp and internal/oauth to release storetest's process-wide template DB, matching internal/server's existing TestMain.
18 lines
371 B
Go
18 lines
371 B
Go
package mcp
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/PerpetualSoftware/pad/internal/store/storetest"
|
|
)
|
|
|
|
// TestMain tears down storetest's process-wide template DB (IDEA-1914)
|
|
// after the suite finishes, so the lazily-built template file doesn't
|
|
// linger past this binary's lifetime.
|
|
func TestMain(m *testing.M) {
|
|
code := m.Run()
|
|
storetest.Cleanup()
|
|
os.Exit(code)
|
|
}
|