MCPcopy
hub / github.com/gotify/server / BeforeTest

Method BeforeTest

api/health_test.go:27–34  ·  view source on GitHub ↗
(suiteName, testName string)

Source from the content-addressed store, hash-verified

25}
26
27func (s *HealthSuite) BeforeTest(suiteName, testName string) {
28 mode.Set(mode.TestDev)
29 s.recorder = httptest.NewRecorder()
30 s.db = testdb.NewDB(s.T())
31 s.ctx, _ = gin.CreateTestContext(s.recorder)
32 withURL(s.ctx, "http", "example.com")
33 s.a = &HealthAPI{DB: s.db}
34}
35
36func (s *HealthSuite) AfterTest(suiteName, testName string) {
37 s.db.Close()

Callers

nothing calls this directly

Calls 3

SetFunction · 0.92
NewDBFunction · 0.92
withURLFunction · 0.70

Tested by

no test coverage detected