MCPcopy
hub / github.com/benbjohnson/wtf / MustCloseServer

Function MustCloseServer

http/server_test.go:63–68  ·  view source on GitHub ↗

MustCloseServer is a test helper function for shutting down the server. Fail on error.

(tb testing.TB, s *Server)

Source from the content-addressed store, hash-verified

61// MustCloseServer is a test helper function for shutting down the server.
62// Fail on error.
63func MustCloseServer(tb testing.TB, s *Server) {
64 tb.Helper()
65 if err := s.Close(); err != nil {
66 tb.Fatal(err)
67 }
68}
69
70// MustNewRequest creates a new HTTP request using the server's base URL and
71// attaching a user session based on the context.

Callers 2

TestLogin_OAuth_GitHubFunction · 0.85
TestDialIndexFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected