MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / GetTestContext

Function GetTestContext

server/api/namespace_test.go:40–48  ·  view source on GitHub ↗
(recorder *httptest.ResponseRecorder)

Source from the content-addressed store, hash-verified

38)
39
40func GetTestContext(recorder *httptest.ResponseRecorder) *gin.Context {
41 gin.SetMode(gin.TestMode)
42 ctx, _ := gin.CreateTestContext(recorder)
43 ctx.Request = &http.Request{
44 Header: make(http.Header),
45 URL: &url.URL{},
46 }
47 return ctx
48}
49
50func TestNamespaceBasics(t *testing.T) {
51 handler := &NamespaceHandler{s: store.NewClusterStore(engine.NewMock())}

Callers 7

TestNodeBasicsFunction · 0.85
TestNamespaceBasicsFunction · 0.85
TestShardBasicsFunction · 0.85
TestClusterFailoverFunction · 0.85
TestClusterBasicsFunction · 0.85
TestClusterImportFunction · 0.85
TestClusterMigrateDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected