MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestNew_CreatesServer

Function TestNew_CreatesServer

pkg/mcp/server_test.go:26–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestNew_CreatesServer(t *testing.T) {
27 cfg := DefaultConfig()
28 srv := New(cfg)
29 if srv == nil {
30 t.Fatal("New() returned nil")
31 }
32 if srv.cfg != cfg {
33 t.Error("cfg not stored on server")
34 }
35 if srv.mcpSrv == nil {
36 t.Error("mcpSrv is nil after New()")
37 }
38}
39
40func TestServer_AuthDisabled(t *testing.T) {
41 cfg := DefaultConfig()

Callers

nothing calls this directly

Calls 3

DefaultConfigFunction · 0.70
NewFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected