返回 DeepSeek-Reasonix
main_test.go
根目录 / internal / control / main_test.go
1 package control
2
3 import (
4 "os"
5 "testing"
6
7 "reasonix/internal/testenv"
8
9 "go.uber.org/goleak"
10 )
11
12 func TestMain(m *testing.M) {
13 cleanupUserState, err := testenv.IsolateUserState()
14 if err != nil {
15 panic(err)
16 }
17 if os.Getenv("REASONIX_CREDENTIALS_STORE") == "" {
18 _ = os.Setenv("REASONIX_CREDENTIALS_STORE", "file")
19 }
20 goleak.VerifyTestMain(m, goleak.Cleanup(func(exitCode int) {
21 cleanupUserState()
22 os.Exit(exitCode)
23 }))
24 }
25
25 lines GO