MCPcopy
hub / github.com/cloudflare/cloudflared / newTestSelector

Function newTestSelector

features/selector_test.go:226–237  ·  view source on GitHub ↗
(t *testing.T, percentages []uint32, pq bool, refreshFreq time.Duration)

Source from the content-addressed store, hash-verified

224}
225
226func newTestSelector(t *testing.T, percentages []uint32, pq bool, refreshFreq time.Duration) *featureSelector {
227 logger := zerolog.Nop()
228
229 resolver := &mockResolver{
230 percentages: percentages,
231 }
232
233 selector, err := newFeatureSelector(t.Context(), testAccountTag, &logger, resolver, []string{}, pq, refreshFreq)
234 require.NoError(t, err)
235
236 return selector
237}
238
239type mockResolver struct {
240 nextIndex int

Callers 3

TestSnapshotIsolationFunction · 0.85
TestStaticFeaturesFunction · 0.85

Calls 2

newFeatureSelectorFunction · 0.85
ContextMethod · 0.65

Tested by

no test coverage detected