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

Function failingFunctionOnZones

pkg/ring/replication_set_test.go:105–112  ·  view source on GitHub ↗
(zones ...string)

Source from the content-addressed store, hash-verified

103}
104
105func failingFunctionOnZones(zones ...string) func(context.Context, *InstanceDesc) (any, error) {
106 return func(ctx context.Context, ing *InstanceDesc) (any, error) {
107 if slices.Contains(zones, ing.Zone) {
108 return nil, errZoneFailure
109 }
110 return 1, nil
111 }
112}
113
114func TestReplicationSet_Do(t *testing.T) {
115 tests := []struct {

Callers 1

TestReplicationSet_DoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected