MCPcopy
hub / github.com/crowdsecurity/crowdsec / assertTotalValidDecisionCount

Function assertTotalValidDecisionCount

pkg/apiserver/apic_test.go:99–105  ·  view source on GitHub ↗
(t *testing.T, dbClient *database.Client, count int)

Source from the content-addressed store, hash-verified

97}
98
99func assertTotalValidDecisionCount(t *testing.T, dbClient *database.Client, count int) {
100 ctx := t.Context()
101 d := dbClient.Ent.Decision.Query().Where(
102 decision.UntilGT(time.Now()),
103 ).AllX(ctx)
104 assert.Len(t, d, count)
105}
106
107func jsonMarshalX(v any) []byte {
108 data, err := json.Marshal(v)

Callers 2

TestAPICWhitelistsFunction · 0.85
TestAPICPullTopFunction · 0.85

Calls 5

UntilGTFunction · 0.92
AllXMethod · 0.45
WhereMethod · 0.45
QueryMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…