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

Function TestWithAlreadyExistingSqliteFolder

database/database_test.go:56–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestWithAlreadyExistingSqliteFolder(t *testing.T) {
57 tmpDir := test.NewTmpDir("gotify_testwithexistingfolder")
58 defer tmpDir.Clean()
59
60 db, err := New("sqlite3", tmpDir.Path("somepath/testdb.db"), "defaultUser", "defaultPass", 5, true)
61 assert.Nil(t, err)
62 assert.DirExists(t, tmpDir.Path("somepath"))
63 db.Close()
64}
65
66func TestPanicsOnMkdirError(t *testing.T) {
67 tmpDir := test.NewTmpDir("gotify_testpanicsonmkdirerror")

Callers

nothing calls this directly

Calls 5

CleanMethod · 0.95
PathMethod · 0.95
NewTmpDirFunction · 0.92
NewFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…