MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestWorkspaceIDContext

Function TestWorkspaceIDContext

backend/api/mcp/tool_http_test.go:94–103  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestWorkspaceIDContext(t *testing.T) {
95 ctx := context.Background()
96
97 // Empty context returns empty string.
98 require.Equal(t, "", getWorkspaceID(ctx))
99
100 // Round-trips through context.
101 ctx = withWorkspaceID(ctx, "wk-test-123")
102 require.Equal(t, "wk-test-123", getWorkspaceID(ctx))
103}

Callers

nothing calls this directly

Calls 3

getWorkspaceIDFunction · 0.85
withWorkspaceIDFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected