MCPcopy Index your code
hub / github.com/gotify/server / TestFileWithSyntaxErrors

Function TestFileWithSyntaxErrors

config/config_test.go:60–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

58}
59
60func TestFileWithSyntaxErrors(t *testing.T) {
61 mode.Set(mode.TestDev)
62 file, err := os.Create("config.yml")
63 defer func() {
64 file.Close()
65 }()
66 assert.Nil(t, err)
67 _, err = file.WriteString(`
68sdgsgsdfgsdfg
69`)
70 file.Close()
71 assert.Nil(t, err)
72 assert.Panics(t, func() {
73 Get()
74 })
75
76 assert.Nil(t, os.Remove("config.yml"))
77}
78
79func TestConfigFile(t *testing.T) {
80 mode.Set(mode.TestDev)

Callers

nothing calls this directly

Calls 3

SetFunction · 0.92
GetFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…