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

Method BeforeTest

database/database_test.go:27–32  ·  view source on GitHub ↗
(suiteName, testName string)

Source from the content-addressed store, hash-verified

25}
26
27func (s *DatabaseSuite) BeforeTest(suiteName, testName string) {
28 s.tmpDir = test.NewTmpDir("gotify_databasesuite")
29 db, err := New("sqlite3", s.tmpDir.Path("testdb.db"), "defaultUser", "defaultPass", 5, true)
30 assert.Nil(s.T(), err)
31 s.db = db
32}
33
34func (s *DatabaseSuite) AfterTest(suiteName, testName string) {
35 s.db.Close()

Callers

nothing calls this directly

Calls 3

NewTmpDirFunction · 0.92
PathMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected