MCPcopy Index your code
hub / github.com/github/github-mcp-server / TestServerToolIsReadOnly

Function TestServerToolIsReadOnly

pkg/inventory/registry_test.go:648–658  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

646}
647
648func TestServerToolIsReadOnly(t *testing.T) {
649 readTool := mockTool("read_tool", "toolset1", true)
650 writeTool := mockTool("write_tool", "toolset1", false)
651
652 if !readTool.IsReadOnly() {
653 t.Error("Expected read tool to be read-only")
654 }
655 if writeTool.IsReadOnly() {
656 t.Error("Expected write tool to not be read-only")
657 }
658}
659
660// mockResource creates a minimal ServerResourceTemplate for testing
661func mockResource(name string, toolsetID string, uriTemplate string) ServerResourceTemplate {

Callers

nothing calls this directly

Calls 3

IsReadOnlyMethod · 0.80
mockToolFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected