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

Function TestFailureOnNormalHttpRequest

api/stream/stream_test.go:24–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22)
23
24func TestFailureOnNormalHttpRequest(t *testing.T) {
25 mode.Set(mode.TestDev)
26
27 defer leaktest.Check(t)()
28
29 server, api := bootTestServer(staticUserID())
30 defer server.Close()
31 defer api.Close()
32
33 resp, err := http.Get(server.URL)
34 assert.Nil(t, err)
35 assert.Equal(t, 400, resp.StatusCode)
36 resp.Body.Close()
37}
38
39func TestWriteMessageFails(t *testing.T) {
40 mode.Set(mode.TestDev)

Callers

nothing calls this directly

Calls 4

SetFunction · 0.92
bootTestServerFunction · 0.85
staticUserIDFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…