MCPcopy Create free account
hub / github.com/cortexproject/cortex / NewClientMock

Function NewClientMock

pkg/ring/kv/dynamodb/client_test.go:400–411  ·  view source on GitHub ↗

NewClientMock makes a new local dynamodb client.

(ddbClient dynamoDbClient, cc codec.Codec, logger log.Logger, registerer prometheus.Registerer, time time.Duration, config backoff.Config)

Source from the content-addressed store, hash-verified

398
399// NewClientMock makes a new local dynamodb client.
400func NewClientMock(ddbClient dynamoDbClient, cc codec.Codec, logger log.Logger, registerer prometheus.Registerer, time time.Duration, config backoff.Config) *Client {
401 return &Client{
402 kv: ddbClient,
403 ddbMetrics: newDynamoDbMetrics(registerer),
404 codec: cc,
405 logger: logger,
406 staleData: make(map[string]staleData),
407 pullerSyncTime: time,
408 backoffConfig: config,
409 }
410
411}
412
413type MockDynamodbClient struct {
414 mock.Mock

Callers 12

Test_CAS_ErrorNoRetryFunction · 0.85
Test_CAS_BackoffFunction · 0.85
Test_CAS_FailedFunction · 0.85
Test_CAS_UpdateFunction · 0.85
Test_CAS_DeleteFunction · 0.85
Test_CAS_Update_DeleteFunction · 0.85
Test_WatchKeyFunction · 0.85
Test_CAS_UpdateStaleFunction · 0.85
Test_WatchPrefixFunction · 0.85
Test_UpdateStaleDataFunction · 0.85

Calls 1

newDynamoDbMetricsFunction · 0.85

Tested by

no test coverage detected