MCPcopy
hub / github.com/redis/go-redis / newTestBaseClient

Function newTestBaseClient

internal_maint_notif_test.go:240–249  ·  view source on GitHub ↗

newTestBaseClient builds a baseClient wired up with hooks for use in tests that exercise initConn directly.

(opt *Options)

Source from the content-addressed store, hash-verified

238// newTestBaseClient builds a baseClient wired up with hooks for use in
239// tests that exercise initConn directly.
240func newTestBaseClient(opt *Options) *baseClient {
241 c := &baseClient{opt: opt}
242 c.initHooks(hooks{
243 dial: c.dial,
244 process: c.process,
245 pipeline: c.processPipeline,
246 txPipeline: c.processTxPipeline,
247 })
248 return c
249}
250
251// TestInitConn_HelloFallback_ModeEnabled verifies that when the server
252// rejects HELLO (so the connection falls back to RESP2) and the user has

Calls 1

initHooksMethod · 0.80

Tested by

no test coverage detected